springboot使⽤druid连接池连接Oracle数据库的基本配置#阿⾥连接池配置
#spring.datasource.druid.driver-class-name=oracle.jdbc.driver.OracleDriver  #可配可不配,阿⾥的数据库连接池会通过url⾃动搜寻
spring.datasource.druid.url=jdbc:oracle:thin:@localhost:1521:orcl
spring.datasource.druid.username=scott
spring.datasource.druid.password=tiger
spring.datasource.druid.initial-size=5
spring.datasource.druid.max-active=20
spring.datasource.druid.min-idle=10
spring.datasource.druid.max-wait=10
#是否缓存preparedStatement,也就是PSCache。PSCache对⽀持游标的数据库性能提升巨⼤,⽐如说oracle。
#在mysql5.5以下的版本中没有PSCache功能,建议关闭掉。
#spring.datasource.druid.pool-prepared-statements=true
#配置间隔多久才进⾏⼀次检测,检测需要关闭的空闲连接,单位是毫秒
#spring.datasource.druid.time-between-eviction-runs-millis=60000
#配置⼀个连接在池中最⼩⽣存的时间,单位是毫秒
#spring.datasource.druid.min-evictable-idle-time-millis=300000
#配置扩展插件:监控统计⽤的filter:stat  ⽇志⽤的filter:log4j  防御sql注⼊的filter:wall
#spring.datasource.druid.filters=stat,wall
#spring.datasource.druid.filter.stat.log-slow-sql=true
druid连接池配置详解
#spring.datasource.druid.filter.stat.slow-sql-millis=2000
#⾃定义配置端⼝号
server.port=8889
#配置项⽬访问时上下⽂路径(项⽬名称)
#t-path=/sbm
#mybatis相关的配置
#实体别名配置配置上后,以后在mapper⽂件中的resultType中原来配置的com.ity.Dept就可以直接写成dept
#mybatis扫描mapper⽂件的配置
mybatis.mapper-locations=classpath:mapper/*.xml
#静态资源⽬录配置

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。