Spring context:component-scan 通配符匹配 博客分类: Spring
程序员文章站
2024-03-17 09:05:10
...
Spring context:component-scan 通配符匹配
<context:component-scan base-package="com.*" />
<context:component-scan base-package="com.*.dao" />
<context:component-scan base-package="com.**.dao" /> // “**”标示不确定层包通配
<context:component-scan base-package="com.*dao" /> // “*dao”以dao结尾的包通配