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.
網絡層協議以及Ping
2.
ping檢測
3.
爲開發者總結了Android ADB 的常用十種命令
4.
3·15 CDN維權——看懂第三方性能測試指標
5.
基於 Dawn 進行多工程管理
6.
缺陷的分類
7.
阿里P8內部絕密分享:運維真經K8S+Docker指南」,越啃越香啊,寶貝
8.
本地iis部署mvc項目,問題與總結
9.
InterService+粘性服務+音樂播放器
10.
把tomcat服務器配置爲windows服務的方法
本站公眾號
歡迎關注本站公眾號,獲取更多信息
相關文章
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
>>更多相關文章<<