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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM