Issue
How does Wicket's @SpringBean
annotation work? Does it use reflection at run time? Does it make the compiler inject some code? Or what?
Solution
Spring uses the class loader and ASM at runtime to find all annotated classes.
You can configure where spring should search for beans:
<context:component-scan base-package="some.package.to.start.from"/>
This uses the ClassPathBeanDefinitionScanner internally which will use the PathMatchingResourcePatternResolver to find the classes and the ASM-based MetadataReader to read the annotations.
Answered By - Thomas Jung