一、错误场景
使用context:component-scan来使用注解(@Component、@Controller、@Repository、@Service)时无法使用bean
二、错误信息


三、解决方案
导入spring-aop-4.3.10.RELEASE.jar
(版本的话根据实际而定,问题解决)
本文介绍了解决 Spring 使用 @Component 等注解时无法使用 Bean 的问题。通过引入 spring-aop-4.3.10.RELEASE.jar,可以有效解决此问题。
使用context:component-scan来使用注解(@Component、@Controller、@Repository、@Service)时无法使用bean


导入spring-aop-4.3.10.RELEASE.jar
(版本的话根据实际而定,问题解决)
1957
3371
1333
9135

被折叠的 条评论
为什么被折叠?