SpringBoot3和mybatis-plus整合出现的问题解决办法
作者:稻心
SpringBoot和MybatisPlus的整合可以让我们更加方便地进行数据库操作,这篇文章主要给大家介绍了关于SpringBoot3和mybatisplus整合出现的一些问题的相关资料,需要的朋友可以参考下
Invalid value type for attribute ‘factoryBeanObjectType’: java.lang.String
springboo3和mybatisplus整合出现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>依赖内部内部的
<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>同时又会出现错误
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);
}总结
到此这篇关于SpringBoot3和mybatisplus整合出现的问题解决的文章就介绍到这了,更多相关SpringBoot3和mybatisplus整合问题内容请搜索脚本之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持脚本之家!
您可能感兴趣的文章:
- SpringBoot整合Mybatis-plus实现多级评论功能
- SpringBoot3整合mybatis-plus的实现
- Springboot3整合Mybatis-plus3.5.3报错问题解决
- SpringBoot整合mybatis-plus实现分页查询功能
- springboot3.2整合mybatis-plus详细代码示例
- SpringBoot3.2.2整合MyBatis-Plus3.5.5依赖不兼容的问题解决
- SpringBoot整合Mybatis-Plus实现关联查询
- 全网最新springboot整合mybatis-plus的过程
- SpringBoot3.3.X整合Mybatis-Plus的实现示例
