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.
eclipse設置粘貼字符串自動轉義
2.
android客戶端學習-啓動模擬器異常Emulator: failed to initialize HAX: Invalid argument
3.
android.view.InflateException: class com.jpardogo.listbuddies.lib.views.ListBuddiesLayout問題
4.
MYSQL8.0數據庫恢復 MYSQL8.0ibd數據恢復 MYSQL8.0恢復數據庫
5.
你本是一個肉體,是什麼驅使你前行【1】
6.
2018.04.30
7.
2018.04.30
8.
你本是一個肉體,是什麼驅使你前行【3】
9.
你本是一個肉體,是什麼驅使你前行【2】
10.
【資訊】LocalBitcoins達到每週交易比特幣的7年低點
本站公眾號
歡迎關注本站公眾號,獲取更多信息
相關文章
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
>>更多相關文章<<