JAVA - SpringBoot operation of the database project references MyBatis

JAVA - SpringBoot operation of the database project references MyBatis

  We say that a blog is how to integrate Springboot and Mybatis frame, and then use the generator to automatically generate mapper, pojo and other documents. Then use the open source connection pool druid Alibaba offered the benefits of connection pooling I will not say, brings together all the benefits of connection pooling, and also provides monitoring capabilities, increased scalability and so on.

 

1. pom.xml cited dependence

  In addition to the introduction of web we rely also introduces three-dependent, namely MySQL, JDBC, Mybatis, as we watch yourself with the complete situation-dependent:

     <!--web依赖-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

 

mybatis version View:

 

        <! - this dependency is already included JDBC dependence -> 
        < dependency > 
            < the groupId > org.mybatis.spring.boot </ the groupId > 
            < the artifactId > MyBatis-Spring-Boot-Starter </ the artifactId > 
            < Version > 3.5.4 </ Version > 
        </ dependency >

 

 

        <!--数据库连接-->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>runtime</scope>
        </dependency>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Quote: https://www.cnblogs.com/zslli/p/8779449.html

 

 

 

 

 

 

 

https://github.com/mybatis/

Guess you like

Origin www.cnblogs.com/1285026182YUAN/p/12334401.html
Recommended