扫码关注官方订阅号
我看都说这个扫描,只会扫描@Component @Controller@Service等这些注解的类。
可是,我上面的配置,personal.test.manager这个包下的所有类都被实例化了。
很多类并没有加注解。
我怎样设置才能只扫面@Component @Controller@Service等这些注解的类呢?
小白一个,谢谢各位大神帮忙解答一下了。
ringa_lee
type 不要用 regex, 使用 annotation
<context:include-filter type="annotation" expression="org.springframework.stereotype.Service" />
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
type 不要用 regex, 使用 annotation