Open wilkinsona opened 4 months ago
This looks very similar to https://github.com/spring-projects/spring-framework/issues/21604 and I hope we can address both these issues consistently. Andy is sharing that a push model where Spring Boot could register a listener could work.
We'd like to improve Spring Boot's failure analysis when refresh fails due to a
NoSuchBeanDefinitionException
by showing the user some information about component scanning. For example, it could be useful for them to know thatcom.example.alpha
has been scanned when the bean that was not found was incom.example.bravo
as it may point towards a misconfiguration of component scanning.Could Framework record information about the component scanning that's been performed and somehow make it accessible? At the moment, it appears to be an implementation detail of configuration class parsing and there's no way for Boot to get at the information or to intercept the scanning.