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>