阿里巴巴数据库连接池druid使用

1、阿里巴巴数据库连接池druid使用

server.port=8000

# DATASOURCE
spring.datasource.platform=mysql
spring.datasource.url=jdbc:mysql://localhost:3306/blendrefund?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
spring.datasource.username=root
spring.datasource.password=123456
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver
spring.datasource.druid.max-active=20
spring.datasource.druid.initial-size=5
spring.datasource.druid.max-wait=60000
spring.datasource.druid.min-idle=5
spring.datasource.druid.time-between-eviction-runs-millis=60000
spring.datasource.druid.min-evictable-idle-time-millis=300000
spring.datasource.druid.test-while-idle=true
spring.datasource.druid.test-on-borrow=false
spring.datasource.druid.test-on-return=false
spring.datasource.druid.pool-prepared-statements=true
spring.datasource.druid.max-pool-prepared-statement-per-connection-size=20
spring.datasource.druid.connection-properties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
spring.datasource.druid.validation-query=SELECT 1 FROM DUAL
spring.datasource.druid.filters=stat,wall
spring.datasource.druid.stat-view-servlet.enabled=true
spring.datasource.druid.stat-view-servlet.login-username=admin
spring.datasource.druid.stat-view-servlet.login-password=admin123
spring.datasource.druid.stat-view-servlet.url-pattern=/druid/*
spring.datasource.druid.stat-view-servlet.reset-enable=false
spring.datasource.druid.web-stat-filter.enabled=true
spring.datasource.druid.web-stat-filter.url-pattern=/*
spring.datasource.druid.web-stat-filter.exclusions=*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*

 

pom文件:



    4.0.0
    
        org.springframework.boot
        spring-boot-starter-parent
        2.2.4.RELEASE
         
    

    org.example
    BlendRefund
    1.0-SNAPSHOT
    
        
            com.alibaba
            druid-spring-boot-starter
            1.2.1
        
        
            com.baomidou
            mybatis-plus-boot-starter
            3.3.2
        
        
            org.springframework.boot
            spring-boot-starter-data-redis
        

        
            cn.hutool
            hutool-all
            5.4.0
        
        
            org.springframework.boot
            spring-boot-starter-data-jdbc
        

        
            org.springframework.boot
            spring-boot-starter-jdbc
        

        
            org.springframework.boot
            spring-boot-starter-aop
        

        
            org.springframework.boot
            spring-boot-starter-thymeleaf
        
        
            org.springframework.boot
            spring-boot-starter-web
        
        
            org.mybatis.spring.boot
            mybatis-spring-boot-starter
            2.1.1
        

        
            org.springframework.boot
            spring-boot-devtools
            runtime
            true
        
        
            mysql
            mysql-connector-java
            runtime
        
        
            org.projectlombok
            lombok
            true
        
        
            org.springframework.boot
            spring-boot-starter-test
            test
        
        
            dom4j
            dom4j
            1.6.1
        
        
            net.sf.json-lib
            json-lib
            2.4
            jdk15
        
        
            commons-codec
            commons-codec
            1.10
        
        
            org.apache.httpcomponents
            httpclient
            4.5.3
        
        
            org.java-websocket
            Java-WebSocket
            1.3.8
        

    



    
        blendRefund
        
            
                org.springframework.boot
                spring-boot-maven-plugin

            
        
    


 

你可能感兴趣的:(spring,boot)