1、在pom.xml文件中导入mybatis-spring-boot-starter依赖
代码键入:
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.3.2</version>
</dependency>
2、在application.yml配置文件中写入配置信息
代码键入:
mybatis:
config-location: classpath:mapping/*Mapper.xml
type-aliases-package: com.example.entity