Springboot和mybatis整合出现的问题

在创建springboot项目的时候并没有勾选mybatis这个选项,但是后来需要涉及到数据库的操作,经过一番操作,哪哪都配置成功但还是连接不到数据库,经过一番查证,需要在pom.xml里添加依赖

<dependency>
    <groupId>org.mybatis.spring.boot</groupId>
    <artifactId>mybatis-spring-boot-starter</artifactId>
    <version>2.0.1</version>
</dependency>

添加以后即成功

原文地址:https://www.cnblogs.com/ccxka/p/14257020.html