SpringBoot3和mybatis-plus整合出現(xiàn)的問題解決辦法
Invalid value type for attribute ‘factoryBeanObjectType’: java.lang.String
springboo3和mybatisplus整合出現(xiàn)Invalid value type for attribute ‘factoryBeanObjectType’: java.lang.String錯誤,原因是
<dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>3.5.4.1</version> </dependency>
依賴內(nèi)部內(nèi)部的
<dependency> <artifactId>mybatis-spring</artifactId> <groupId>org.mybatis</groupId> </dependency>
依賴版本過低
處理方案是,排除原有的版本,引入新的依賴版本
<dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>3.5.4.1</version> <exclusions> <exclusion> <artifactId>mybatis-spring</artifactId> <groupId>org.mybatis</groupId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> <version>3.0.3</version> </dependency>
同時又會出現(xiàn)錯誤
Bean named 'ddlApplicationRunner' is expected to be of type 'org.springframework.boot.Runner' but was actually of type 'org.springframework.beans.factory.support.NullBean'
需要注入一個名為DdlApplicationRunner的Bean
@Bean public DdlApplicationRunner ddlApplicationRunner(@Autowired(required = false) List ddlList) { return new DdlApplicationRunner(ddlList); }
總結(jié)
到此這篇關(guān)于SpringBoot3和mybatisplus整合出現(xiàn)的問題解決的文章就介紹到這了,更多相關(guān)SpringBoot3和mybatisplus整合問題內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
- SpringBoot整合Mybatis-plus實(shí)現(xiàn)多級評論功能
- SpringBoot3整合mybatis-plus的實(shí)現(xiàn)
- Springboot3整合Mybatis-plus3.5.3報錯問題解決
- SpringBoot整合mybatis-plus實(shí)現(xiàn)分頁查詢功能
- springboot3.2整合mybatis-plus詳細(xì)代碼示例
- SpringBoot3.2.2整合MyBatis-Plus3.5.5依賴不兼容的問題解決
- SpringBoot整合Mybatis-Plus實(shí)現(xiàn)關(guān)聯(lián)查詢
- 全網(wǎng)最新springboot整合mybatis-plus的過程
- SpringBoot3.3.X整合Mybatis-Plus的實(shí)現(xiàn)示例
相關(guān)文章
關(guān)于kafka發(fā)送消息的三種方式總結(jié)
這篇文章主要介紹了關(guān)于kafka發(fā)送消息的三種方式總結(jié),具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教2023-04-04解讀線程池-Executors的newSingleThreadExecutor和newFixedThreadPool(1
這篇文章主要介紹了解讀線程池-Executors的newSingleThreadExecutor和newFixedThreadPool(1)區(qū)別,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教2024-08-08Java靜態(tài)內(nèi)部類實(shí)現(xiàn)單例過程
這篇文章主要介紹了Java靜態(tài)內(nèi)部類實(shí)現(xiàn)單例過程,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友可以參考下2019-10-10SpringMvc MultipartFile實(shí)現(xiàn)圖片文件上傳示例
本篇文章主要介紹了SpringMvc MultipartFile實(shí)現(xiàn)圖片文件上傳示例,具有一定的參考價值,感興趣的小伙伴們可以參考一下。2017-02-02Spring+SpringMVC+MyBatis深入學(xué)習(xí)及搭建(二)之MyBatis原始Dao開發(fā)和mapper代理開發(fā)
這篇文章主要介紹了Spring+SpringMVC+MyBatis深入學(xué)習(xí)及搭建(二)之MyBatis原始Dao開發(fā)和mapper代理開發(fā),需要的朋友可以參考下2017-05-05Spring?Cloud?Alibaba負(fù)載均衡實(shí)現(xiàn)方式
這篇文章主要為大家介紹了Spring?Cloud?Alibaba負(fù)載均衡實(shí)現(xiàn)方式詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪2022-10-10