SpringBoot------集成MyBatis报错

在spring boot启动main方法所在的类中加入

@MapperScan注入后报错:

Invalid default: public abstract java.lang.Class org.mybatis.spring.annotation.MapperScan.factoryBean()

解决方法:

在pom.xml中加入

<dependency>
    <groupId>org.mybatis.spring.boot</groupId>
    <artifactId>mybatis-spring-boot-starter</artifactId>
    <version>1.3.2</version>
    <scope>runtime</scope>
<dependency>

转载:

https://blog.csdn.net/qq_28286027/article/details/83013307

猜你喜欢

转载自www.cnblogs.com/tianhengblogs/p/10630008.html