Transactional cannot be resolved to a type


SpringBoot整合Mybatis時遇到“ Transactional cannot be resolved to a type ” ,以為是沒有導入相應的包 “ import org.springframework.transaction.annotation.Transactional; ” ,導入發現還是報錯,在Stack Overflow上找到解決辦法。在pom.xml中加入

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-tx</artifactId>
    <version>4.2.6.RELEASE</version>
</dependency>


免責聲明!

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



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