The move away from reflection in https://github.com/spring-projects/spring-boot/issues/22322 has introduced a package tangle as org.springframework.boot now directly references org.springframework.boot.web.servlet.context. Previously, this was hidden via the use of reflection.
Things have moved on since #22322 such that the use of reflection may no longer be a problem. For example, Spring Native configures its own ApplicationContextFactory when AOT is enabled so the default factory isn't used in that situation. It may be possible to fix this, or at least hide it again, by reintroducing the use of reflection.
Comment From: snicoll
We can certainly revisit anything that was done as part of a previous version of Spring Native. Spring Native 0.10.x still builds on 2.5.x and is probably still relying on that somehow. To be consistent, maybe rollback this as of 2.6.x?
Comment From: philwebb
We're going to look at using spring.factories. This will be a similar fix to https://github.com/spring-projects/spring-boot/commit/8f5959ba1d036ce54357a871aabdb6af8999db8e