SpringBoot中使用@Mapper注解需要哪个包

场景

在Eclipse中新建springBoot项目后,要使用@Mapper注解。

SpringBoot中使用@Mapper注解需要哪个包SpringBoot中使用@Mapper注解需要哪个包

实现

打开pom.xml

添加

<!-- mybatis整合Springboot -->
   <dependency>
   <groupId>org.mybatis.spring.boot</groupId>
   <artifactId>mybatis-spring-boot-starter</artifactId>
   <version>1.1.1</version>
  </dependency>

然后导包时:

import org.apache.ibatis.annotations.Mapper;