【使用注解版SpringAOP出现注入资源依赖性失败; 】 | IT修真院·坑乎
咨询电话 : 010-59478634
切换导航
首页
我的提问
我的回答
我的点赞
消息通知
个人主页
×
提示
尚未登陆,前往官网登陆?
×
提示
尚未登陆,前往官网登陆?
使用注解版SpringAOP出现注入资源依赖性失败;
我也踩过这个坑(
1
)
已统计您的踩坑,无需重复点击
回答(0)
详细描述
org.springframework.test.context.TestContextManager prepareTestInstance 严重: Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@49e4cb85] to prepare test instance [com.aopdemo.TimeTest@50b5ac82] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.aopdemo.TimeTest': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.springAOP.MyMath' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}
错误截图
这里面SpringAOP有扫描,也有注解,注解没有错误,但是却说注入依赖失败,网上说是Spring的xml文件配置错误,但是xml文件就两行没有出错,引用的也是对的,但是就是不能成功运行
编辑于2025-04-17
Copyright ©2015 北京葡萄藤信息技术有限公司 All Rights Reserved | 京ICP备15035574号-1
复制链接
新浪微博
微信扫一扫
2808
0
10
使用注解版SpringAOP出现注入资源依赖性失败;
0
1