JavaShuo
栏目
标签
Parameter 0 of constructor in XXXrequired a single bean, but 2 were found:
时间 2021-07-14
标签
java
栏目
Java
繁體版
原文
原文链接
@ Parameter 0 of constructor in XXXrequired a single bean, but 2 were found: 记录一下踩了一周的坑 其实很简单 网上有各种版本的解决方案 比如加@primary等等 但是这些不是最根本的解决方案,之所以出现这个错误的原因是创建bean对象的时候包扫描把这些接口都给扫描进去了,所以才会报错。 我是用的springboot+m
>>阅读原文<<
相关文章
1.
required a single bean, but 2 were found 问题
2.
Field baseMapper in com.xxx required a single bean,but 100 were found --------Mybatis-Plus
3.
@Autowired 注入 **required a single bean, but 2 were found**
4.
Parameter 0 of constructor in XXX required a bean of type ‘XXX‘ that could not be found.
5.
expected single matching bean but found 2
6.
Parameter 0 of method redisTemplate in org.springframework.boot.autoconfigure.data.redis.RedisAut...
7.
Parameter 0 of method linkDiscoverers in org.springframework.hateoas.config.HateoasConfiguration req
8.
Parameter 1 of constructor in xxx required a bean of type xxx‘ that could not be found.已经解决
9.
Could not autowire. No beans of String type found. Checks autowiring problems in a bean class
10.
多数据源报错 expected single matching bean but found 2: xxx,xxx
更多相关文章...
•
ADO Parameter 对象
-
ADO 教程
•
Thymeleaf扩展2(Say Hello)
-
Thymeleaf 教程
•
Java 8 Stream 教程
•
Kotlin学习(二)基本类型
相关标签/搜索
parameter
0.a
single
constructor
bean
2&&a
2-0
a'+'a
but'1.7
Java
PHP 7 新特性
Spring教程
MySQL教程
0
分享到微博
分享到微信
分享到QQ
每日一句
每一个你不满意的现在,都有一个你没有努力的曾经。
最新文章
1.
ubantu 增加搜狗输入法
2.
用实例讲DynamicResource与StaticResource的区别
3.
firewall防火墙
4.
页面开发之res://ieframe.dll/http_404.htm#问题处理
5.
[实践通才]-Unity性能优化之Drawcalls入门
6.
中文文本错误纠正
7.
小A大B聊MFC:神奇的静态文本控件--初识DC
8.
手扎20190521——bolg示例
9.
mud怎么存东西到包_将MUD升级到Unity 5
10.
GMTC分享——当插件化遇到 Android P
本站公众号
欢迎关注本站公众号,获取更多信息
相关文章
1.
required a single bean, but 2 were found 问题
2.
Field baseMapper in com.xxx required a single bean,but 100 were found --------Mybatis-Plus
3.
@Autowired 注入 **required a single bean, but 2 were found**
4.
Parameter 0 of constructor in XXX required a bean of type ‘XXX‘ that could not be found.
5.
expected single matching bean but found 2
6.
Parameter 0 of method redisTemplate in org.springframework.boot.autoconfigure.data.redis.RedisAut...
7.
Parameter 0 of method linkDiscoverers in org.springframework.hateoas.config.HateoasConfiguration req
8.
Parameter 1 of constructor in xxx required a bean of type xxx‘ that could not be found.已经解决
9.
Could not autowire. No beans of String type found. Checks autowiring problems in a bean class
10.
多数据源报错 expected single matching bean but found 2: xxx,xxx
>>更多相关文章<<