在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