Advertisement

Spring Boot和Mybatis支持MySQL数据库连接

阅读量:

SpringBoot与Mybatis的整合过程相对简便,本文将重点介绍如何通过Mapper.xml文件编写SQL语句。

(1)在build.gradle配置文件中引入相关依赖

复制代码
     // https://mvnrepository.com/artifact/com.github.pagehelper/pagehelper

    
     compile group: 'com.github.pagehelper', name: 'pagehelper', version: '5.1.2'
    
  
    
  
    
     // https://mvnrepository.com/artifact/mysql/mysql-connector-java
    
     compile group: 'mysql', name: 'mysql-connector-java', version: '6.0.6'
    
  
    
     // https://mvnrepository.com/artifact/org.mybatis.spring.boot/mybatis-spring-boot-starter
    
     compile group: 'org.mybatis.spring.boot', name: 'myb

全部评论 (0)

还没有任何评论哟~