@Configuation等价于<Beans></Beans>
@Bean等价于<Bean></Bean>
@ComponentScan等价于<context:component-scan base-package=”com.abc.def”/>
@Configuration一般被用来初始化配置,有两种方法可以使带有@Configuration的类被初始化,
一为让把类所在包的路径纳入scanBasePackages,这样就进入了Spring的扫描范围;
另一类太麻烦,不推荐使用。
@Configuation等价于<Beans></Beans>
@Bean等价于<Bean></Bean>
@ComponentScan等价于<context:component-scan base-package=”com.abc.def”/>
@Configuration一般被用来初始化配置,有两种方法可以使带有@Configuration的类被初始化,
一为让把类所在包的路径纳入scanBasePackages,这样就进入了Spring的扫描范围;
另一类太麻烦,不推荐使用。