Springboot from getting started to getting started (four connection pools Druid)

wwz_ henu 2022-02-13 05:26:10 阅读数:676

springboot getting started getting started

One . add to  dependency

<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.1.10</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>1.1.10</version>
</dependency>

Two . To configure

edit application.yml, increase druid To configure

 type: com.alibaba.druid.pool.DruidDataSource
druid:
minIdle: 5 # Minimum number of idle connections
initialSize: 5 # Initialize connection size
maxActive : 5 # maximum connection
stat-view-servlet:
login-username: admin # Login username
login-password: 123456 # The login password 

3、 ... and . Start project , visit  http://127.0.0.1/druid/login.html

copyright:author[wwz_ henu],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/02/202202130526093932.html