赞
踩
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>
同时又会出现错误
需要注入一个名为DdlApplicationRunner的Bean
@Bean public DdlApplicationRunner ddlApplicationRunner(@Autowired(required = false) List ddlList) { return new DdlApplicationRunner(ddlList); }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。