Unsatisfied dependency expressed through field ‘baseMapper‘ 原因
Unsatisfied dependency expressed through field ‘baseMapper’ 原因
使用MybatisPlus
後,今天突然出現了莫名的報錯原因:
Unsatisfied dependency expressed through field 'baseMapper'
,看到該報錯名稱一臉懵逼,但是通過字面意思理解,其實就是依賴錯誤,由於本專案是微服務設計模式,因此關於DB的操作都是依賴的另一個服務,按照邏輯而言,也就是說MP的baseMapper
未被加入到IOC容器中,否則不可能會依賴失敗,因此推斷是由於本專案中未將DB服務下的相關元件納入到IOC容器所致,因此將DB服務下的相關【MAPPER元件】納入到IOC容器中,具體操作就是在@ComponentScan
掃描器中加入DB服務下的MAPPER元件包即可,問題解決
相關文章
- Error creating bean with name ‘dataSource‘: Unsatisfied dependency expressed through fieldErrorBeanExpress
- dependency injection
- mvn dependency:tree
- [Javascript] Circular dependencyJavaScript
- How to find dependency
- 工作學習筆記(十九)MyBatis—Plus中的BaseMapper筆記MyBatisAPP
- misdirection靶機work_through
- LamPiao靶機work_throughLAMP
- vue 踩坑-This dependency was not foundVue
- MySQL 之 ORDER BY FIELDMySql
- mongoengine.errors.OperationError: Update failed (BSON field ‘no_cursor_timeout‘ is an unknown fieldGoErrorAI
- Through the NBA, clubs players and fans paid their respectsAI
- 11-Overview-Field SelectorsView
- copying model and updating field of pydantic
- Field Parameter的設定
- tpextbuilder- Displayers[元件]- FieldUI元件
- TypeScript 裡的 class fieldTypeScript
- [LeetCode] 524. Longest Word in Dictionary through DeletingLeetCode
- SAP產品的Field Extensibility
- Neural Radiance Field (NeRF): A Gentle Introduction
- Exercise 5: Field data acquisition and analysisUI
- Dependency Injection-依賴注入詳解依賴注入
- 解決Vue中”This dependency was not found”的方法Vue
- 理解ASP.NET Core - [03] Dependency InjectionASP.NET
- spring data mongo @Field 失效問題SpringGo
- 1364 - Field did doesnt have a default value
- tc39 proposal: Class field declarations
- 關於隱藏引數:_no_recovery_through_resetlogs
- link/Extended dependency 無法顯示連線
- .Net DI(Dependency Injection)依賴注入機制依賴注入
- Node.js 應用 peer dependency 的用法Node.js
- mysql Unknown column ‘‘ in ‘field list‘解決方案MySql
- 「Deep Interest Network for Click-Through Rate Prediction」- 論文摘要REST
- w1R3s靶機work_through
- Maven中的dependency的scope作用域詳解Maven
- ERROR: failed to establish dependency between database db_name and diskgroupErrorAIDatabase
- Maven Dependency Version:依賴版本自動升級Maven
- nameko 的內聯繫結和 Dependency 解讀