SpringBoot 2.1.1.RELEASE 集成MyBatis

SpringBoot 2.1.1.RELEASE 集成MyBatis
maven工程:
详细配置见:
http://www.qchcloud.cn/system/article/show/63
pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>cn.qchcloud</groupId>
<artifactId>iot</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>iot</name>
<description>iot project for Spring Boot</description>

<properties>
    <java.version>1.8</java.version>
    <mybatis.spring.boot.starter.version>1.3.2</mybatis.spring.boot.starter.version>
</properties>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-aop</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
    </dependency>
    <dependency>
        <groupId>org.mybatis.spring.boot</groupId>
        <artifactId>mybatis-spring-boot-starter</artifactId>
        <version>${mybatis.spring.boot.starter.version}</version>
    </dependency>
    <dependency>
<groupId>com.google.collections</groupId>
<artifactId>google-collections</artifactId>
<version>1.0-rc2</version>

</dependency>

</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>

</project>

原文地址:http://blog.51cto.com/14042154/2327938

时间: 2024-10-31 01:40:16

SpringBoot 2.1.1.RELEASE 集成MyBatis的相关文章

SpringBoot 2.1.1.RELEASE 集成Druid

SpringBoot 2.1.1.RELEASE 集成Druid详情:http://www.qchcloud.cn/system/article/show/68配置依赖: mysql mysql-connector-java com.alibaba druid 1.1.4 配置applicaton.properties spring.datasource.driverClassName = com.mysql.cj.jdbc.Driver spring.datasource.url = jdbc

SpringBoot 2.1.1.RELEASE 集成quartz

SpringBoot 2.1.1.RELEASE 集成quartzhttp://www.qchcloud.cn/system/article/show/70依赖配置: <!-- 定时任务 --> <dependency> <groupId>org.quartz-scheduler</groupId> <artifactId>quartz</artifactId> </dependency> 定时任务: @Component

SpringBoot 2.1.1.RELEASE集成devtools

SpringBoot 2.1.1.RELEASE集成devtoolshttp://www.qchcloud.cn/system/article/show/74引入依赖: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> &

springBoot(11):集成Mybatis

一.添加依赖 <!--mybatis--> <dependency>    <groupId>org.mybatis.spring.boot</groupId>    <artifactId>mybatis-spring-boot-starter</artifactId>    <version>1.2.0</version> </dependency> <dependency>    

SpringBoot 2.1.1.RELEASE 集成Email

依赖配置: <!-- mail start --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-mail</artifactId> </dependency> 配置文件: ### mail邮件配置 spring.mail.host=smtp.xxx.com.cn [email protect

spring-boot学习之集成mybatis

一.关于spring boot 1.spring boot 简而言之就是使spring启动更容易,它的座右铭是"just run",大多数spring应用程序仅仅需要很少的配置,使用spring-boot将大大减少编写spring相关的代码量和xml配置文件 2.通常情况下spring-boot会在classpath下寻找application.properties或者application.yml配置文件,绝大多数的应用都会在此配置文件里配置 二 spring boot集成Mybat

springboot集成mybatis

springboot如何配置web项目请参考前一章,在此基础上集成mybatis. 在pom文件中添加mybatis的依赖: <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>1.2.0</version> </dependency&

SpringBoot集成MyBatis的分页插件PageHelper

俗话说:好??不吃回头草,但是在这里我建议不管你是好马还是不好马,都来吃吃,带你复习一下分页插件PageHelper. 昨天给各位总结了本人学习springboot整合mybatis第一阶段的一些学习心得和源码,主要就算是敲了一下SpringBoot的门儿,希望能给各位的入门带给一点儿捷径,今天给各位温习一下MyBatis的分页插件PageHelper和SpringBoot的集成,它的使用也非常简单,开发更为高效.因为PageHelper插件是属于MyBatis框架的,所以相信很多哥们儿都已经用

springboot(二)集成mybatis

全部内容:1,集成mybatis 2,分页查询使用分页插件pagehelper工程代码:https://github.com/showkawa/springBoot_2017/tree/master/spb-demo 1.添加集成mybatis的依赖 <!--最新版本,匹配spring Boot1.5及以上的版本--> <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId