检查pom.xml,导入 org.mybatis.spring.boot 依赖:
XML
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>3.0.3</version>
</dependency>
刷新maven
解决: