我这个MapperScan注解为什么会报错?我的包有问题还是什么问题?
我的<mybatis:scan />这个节点在xml文件中报错,我应该如何解决,求大神帮帮忙
import org.mybatis.spring.annotation.MapperScan;
<dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>1.3.2</version> </dependency>
pom添加以下两个依赖 <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>3.2.8</version> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> <version>1.2.2</version> </dependency>
<!-- mybatis -->22 <dependency>23 <groupId>org.mybatis</groupId>24 <artifactId>mybatis</artifactId>25 <version>3.2.8</version>26 </dependency>27 <dependency>28 <groupId>org.mybatis</groupId>29 <artifactId>mybatis-spring</artifactId>30 <version>1.2.2</version>31 </dependency>
你可能没有导入吧
import org.mybatis.spring.annotation.MapperScan;