SpringApplication uses a package private BeanDefinitionLoader (in its load() method) that unconditionally tries to load bean definitions using @Configuration, XML, Groovy and a component scan for @Component. It would be good to have more control in a vanilla Spring Boot app, e.g. to opt out of all or some of those. The @Configuration option in particular is quite expensive.
User can work around it by subclassing SpringApplication but that only works in the main() method - doesn't work for integration tests (for instance).
Comment From: ayudovin
@dsyer, Does it help us if we use public for BeanDefinitionLoader ?
in this case we'll be able to extends this class anywhere
Comment From: dsyer
Yes, but that breaks the encapsulation. We probably need to break up BeanDefinitionLoader and make the extension points more precise than just defining a subclass.
Comment From: philwebb
We're cleaning out the issue tracker and closing issues that we've not seen much demand to fix. Feel free to comment with additional justifications if you feel that this one should not have been closed.