I'm running a war file on a tomcat webserver environment.
I have an annotation based config for @Beans
, and a xml config for webservices:
@Configuration
//@ComponentScan(basePackageClasses = ...)
public class AppConfig {
//beans @Bean
}
applicationContext.xml:
<beans>
<context:component-scan base-package="..."/>
<jaxws:endpoint ... />
</bean>
Problem: I would like to define @ComponentScan
by annotation only to have typesafety. But if I do so, the scanning is not performed. In contrast, when I use <context:component-scan..
everything works fine.
Is Spring
component scanning within a webserver tied to configuration with xml for the package scanning?