spring boot集成mybatis需要的相关依赖

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了spring boot集成mybatis需要的相关依赖相关的知识,希望对你有一定的参考价值。

<dependencies>
        <!-- 单元测试 -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- springboot对面向切面编程的支持,包括spring-aop和aspectj -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aop</artifactId>
        </dependency>
        <!-- 通过spring-rabbit来支持AMQP协议 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-amqp</artifactId>
        </dependency>
        <!-- 对全栈web开发的支持,包括tomcat和spring-webmvc -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <!-- TODO 发布生产的时候需要将此段放开 -->
            <!-- <exclusions> -->
            <!-- <exclusion> -->
            <!-- <groupId>org.springframework.boot</groupId> -->
            <!-- <artifactId>spring-boot-starter-tomcat</artifactId> -->
            <!-- </exclusion> -->
            <!-- </exclusions> -->
        </dependency>
        <!-- 支持常规的测试依赖,包括junit,hamcrest.mockito以及spring-test -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
        </dependency>
        <!-- 生产准备的特征,用于帮你监控和管理应用 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
     <!--核心spring boot starter,包括自动配置支持,日志和YAML -->
     <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>
     <!--对jdbc数据库的支持 -->
     <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>spring-boot-starter-jdbc</artifactId>
        </dependency>
     <!--对spring-security的支持 -->
     <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
     <!--对spring-redis的支持 ,支持Redis键值存储数据库-->
     <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>spring-boot-starter-redis</artifactId>
        </dependency>
        <!-- mybatis -->
        <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>1.1.1</version>
        </dependency>
        <!-- mysql -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>1.2.30</version>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid</artifactId>
            <version>1.0.24</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>5.3.1.Final</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.0.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>commons-httpclient</groupId>
            <artifactId>commons-httpclient</artifactId>
            <version>3.1</version>
        </dependency>
        <!--pagehelper -->
        <!-- <dependency>
            <groupId>com.github.pagehelper</groupId>
            <artifactId>pagehelper-spring-boot-starter</artifactId>
            <version>1.1.1</version>
        </dependency> -->
        <dependency>
              <groupId>com.github.pagehelper</groupId>
              <artifactId>pagehelper</artifactId>
             <version>4.1.6</version>
         </dependency>
        
    </dependencies>

 

以上是关于spring boot集成mybatis需要的相关依赖的主要内容,如果未能解决你的问题,请参考以下文章

Spring Boot集成Mybatis

Spring Boot入门——集成Mybatis

spring boot 集成 mybatis

企业分布式微服务云SpringCloud SpringBoot mybatis (三十)关于spring boot集成apidoc

mybatis(spring boot集成mybatis,拦截器实现动态sql)

Spring Boot 2.X:集成 mybatis-plus 高效开发