Spring组件扫描<context:component-scan/>使用详解
1.如果不想在xml文件中配置bean,我们可以给我们的类加上spring组件注解,只需再配置下spring的扫描器就可以实现bean的自动载入。
2.下面是引用spring framework开发手册中的一段话“
Spring 2.5引入了更多典型化注解(stereotype annotations): @Component、@Service和 @Contro
转载
2015-06-01 18:50:48 ·
577 阅读 ·
0 评论