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.
shell編譯問題
2.
mipsel 編譯問題
3.
添加xml
4.
直方圖均衡化
5.
FL Studio鋼琴卷軸之畫筆工具
6.
中小企業爲什麼要用CRM系統
7.
Github | MelGAN 超快音頻合成源碼開源
8.
VUE生產環境打包build
9.
RVAS(rare variant association study)知識
10.
不看後悔系列!DTS 控制檯入門一本通(附網盤鏈接)
本站公眾號
歡迎關注本站公眾號,獲取更多信息
相關文章
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
>>更多相關文章<<