欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

SpringBoot3和mybatis-plus整合出現(xiàn)的問題解決辦法

 更新時間:2024年01月12日 11:18:46   作者:稻心  
SpringBoot和MybatisPlus的整合可以讓我們更加方便地進(jìn)行數(shù)據(jù)庫操作,這篇文章主要給大家介紹了關(guān)于SpringBoot3和mybatisplus整合出現(xiàn)的一些問題的相關(guā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)文章希望大家以后多多支持腳本之家!

相關(guān)文章

最新評論