網站首頁 編程語言 正文
項目集成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
- 上一篇:沒有了
- 下一篇:沒有了
相關推薦
- 2023-04-27 antd?upload上傳如何獲取文件寬高_React
- 2022-05-04 一文帶你分清C++的定義,聲明和初始化_C 語言
- 2023-07-18 @Autowired在IDEA中報錯,如果修改呢?
- 2025-02-10 window11 系統安裝 yarn
- 2023-01-15 使用SimpleITK讀取NII格式三維圖像及注意事項說明_python
- 2022-08-29 .NET實現API版本控制_實用技巧
- 2023-07-10 分布式緩存之Redis(持久化、主從、哨兵、分片集群)
- 2023-01-17 Android繪制文本與圖片及動效詳解_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同步修改后的遠程分支