1、添加mybatis springboot依赖
<dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>2.1.2</version> </dependency>
2、感悟,之前用mybatis与spring整合 web项目时,好多配置需要在mybatis的config.xml中配置信息,还要将mapper.xml等配置到配置文件中。现在的话,只需要在yml文件中配置这些,非常方便。