摘要: 在xml配置了这个标签后,spring可以自动去扫描base-pack下面或者子包下面的java文件,如果扫描到有@Component @Controller@Service等这些注解的类,则把这些类注册为bean 注意:如果配置了<context:component-scan>那 么<contex 阅读全文
posted @ 2016-03-17 20:10 北方乐逍遥 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 在基于主机方式配置Spring的配置文件中,你可能会见到<context:annotation-config/>这样一条配置,他的作用是式地向 Spring 容器注册 AutowiredAnnotationBeanPostProcessor、CommonAnnotationBeanPostProce 阅读全文
posted @ 2016-03-17 19:58 北方乐逍遥 阅读(130) 评论(0) 推荐(0) 编辑