spring标签<context:component-scan>详解
<context:componet-scan>标签属性设置:
1、base-package:指定了需要扫描的类包,类包及其递归子包中所有的类都会被处理。
2、name-generator:指定产生规则
3、use-default-filters="false":表示不要使用默认的过滤器,此处的默认过滤器,会扫描包含Service,Component,Repository,Controller注解修饰的类
<context:componet-scan>标签属性设置:
1、base-package:指定了需要扫描的类包,类包及其递归子包中所有的类都会被处理。
2、name-generator:指定产生规则
3、use-default-filters="false":表示不要使用默认的过滤器,此处的默认过滤器,会扫描包含Service,Component,Repository,Controller注解修饰的类