• spring boot 数据源 配置


    #数据库访问配置
    #mysql
    #spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
    #spring.datasource.driver-class-name=com.mysql.jdbc.Driver
    #spring.datasource.url=jdbc:mysql://localhost:3306/blog
    #oracle
    spring.datasource.driverClassName=oracle.jdbc.driver.OracleDriver
    spring.datasource.url=jdbc:oracle:thin:@127.0.0.1:1521:orcl
    spring.datasource.username=system
    spring.datasource.password=123456
    
    #连接池配置
    spring.datasource.initialSize=5
    spring.datasource.minIdle=5
    spring.datasource.maxActive=20
    #连接等待超时时间
    spring.datasource.maxWait=60000
    #配置隔多久进行一次检测(检测可以关闭的空闲连接)
    spring.datasource.timeBetweenEvictionRunsMillis=60000
    #配置连接在池中的最小生存时间
    spring.datasource.minEvictableIdleTimeMillis=300000
    spring.datasource.validationQuery=SELECT 1 FROM DUAL
    spring.datasource.testWhileIdle=true
    spring.datasource.testOnBorrow=false
    spring.datasource.testOnReturn=false
    # 打开PSCache,并且指定每个连接上PSCache的大小
    spring.datasource.poolPreparedStatements=true
    spring.datasource.maxPoolPreparedStatementPerConnectionSize=20
    # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
    spring.datasource.filters=stat,wall,log4j
    # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
    spring.datasource.connectionProperties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
  • 相关阅读:
    GAMIT中遇到的错误
    bash: ./install_software: Permission denied
    xmanager无法加载远程桌面
    GMT的安装
    小总结:Gamit中常见常用命令
    动态分配指针数组(以解决)
    Gamit使用gftp软件下载数据
    Python基础(1)
    JAVA中关于多线程的理解
    JAVA 基本绘图——利用JFrame JPanel 绘制扇形
  • 原文地址:https://www.cnblogs.com/whm-blog/p/7260046.html
Copyright © 2020-2023  润新知