網站首頁 編程語言 正文
項目集成xxljob時,報錯:
Parameter 0 of method xxlJobSpringExecutor in com.wf.job.XxlJobAutoConfiguration required a single bean, but 2 were found:
- xxlJobProperties: defined in URL [jar:file:/C:/Users/777/.m2/repository/com/xx/xx-xxl-job-spring-boot-starter/1.0.0/wf-xxl-job-spring-boot-starter-1.0.0.jar!/com/xx/job/properties/XxlJobProperties.class]
- xx.xxl-job-com.xx.job.properties.XxlJobProperties: defined in null
因為xxljob組件是自己在xxljob的基礎上封裝的,然后項目啟動報錯,
原因是在啟動類加 `@ComponentScan` 注解,配置的包掃描路徑重復了,導致重新生成兩個bean,而且一個bean?defined in null.
解決辦法就是把包掃描的路徑改下,不能有包含關系。
原文鏈接:https://blog.csdn.net/Json_Marz/article/details/126762269
- 上一篇:沒有了
- 下一篇:沒有了
相關推薦
- 2022-04-12 C++制作簡單的計算器功能_C 語言
- 2023-04-24 Python?相對路徑報錯:"No?such?file?or?directory"'原因及解決方法_
- 2022-06-12 Go依賴注入DI工具wire使用詳解(golang常用庫包)_Golang
- 2022-09-21 詳解C語言中typedef和#define的用法與區別_C 語言
- 2022-05-04 一文帶你分清C++的定義,聲明和初始化_C 語言
- 2022-12-11 React?狀態的不變性實例詳解_React
- 2022-11-23 詳解Android創建Handler的必備知識點_Android
- 2022-05-12 adb 導出android目錄下的文件
- 欄目分類
-
- 最近更新
-
- window11 系統安裝 yarn
- 超詳細win安裝深度學習環境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優雅實現加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發現-Nac
- Spring Security之基于HttpR
- Redis 底層數據結構-簡單動態字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支