zoukankan      html  css  js  c++  java
  • 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
    #spring.datasource.druid.filter.stat.slow-sql-millis=2000
    
    
    #自定义配置端口号
    server.port=8889
    #配置项目访问时上下文路径(项目名称)
    #server.servlet.context-path=/sbm
    
    #mybatis相关的配置
    
    #实体别名配置 配置上后,以后在mapper文件中的resultType中原来配置的com.guangming.springboot.entity.Dept就可以直接写成dept
    mybatis.type-aliases-package=com.guangming.springboot.entity
    #mybatis扫描mapper文件的配置
    mybatis.mapper-locations=classpath:mapper/*.xml
    
    #静态资源目录配置
    spring.resources.static-locations=classpath:/templates/,classpath:/static/,classpath:/resources/
  • 相关阅读:
    (转)干货|一次完整的性能测试,测试人员需要做什么?
    (转)JMeter性能测试-服务器资源监控插件详解
    【Android Apk重新签名报错re-sign.jar之解决方法】
    CrackMe_001
    判断二叉树是否是镜像对称
    顺时针打印矩阵
    利用前序遍历和中序遍历构造二叉树
    二叉树的四种遍历方式
    最长回文子串
    同步/异步/阻塞/非阻塞
  • 原文地址:https://www.cnblogs.com/duguangming/p/11245154.html
Copyright © 2011-2022 走看看