Spring基础(六):类扫描机制

1.在xml中配置类扫描机制spring <context:component-scan base-package="spring.scan"></context:component-scan>            这句话既包含了依赖注入的解析器,还包含了类扫描code 2.在类上标注注解@Component("aa"),Spring容器为该bean建立对象component          
相关文章
相关标签/搜索