application-hb.yml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. # 项目相关配置
  2. gyee:
  3. #实时数据库Url
  4. baseurl: http://192.168.2.198:8011/ts
  5. healthurl: http://192.168.2.198:8012/ts
  6. #实时数据库选择
  7. realtimedataBase: mongodb #数据查询模式 golden、hwy
  8. initialcode: INITIAL
  9. server:
  10. port: 8162
  11. servlet:
  12. context-path: /
  13. management:
  14. health:
  15. redis:
  16. enabled: false
  17. mybatis-plus:
  18. configuration:
  19. map-underscore-to-camel-case: true
  20. auto-mapping-behavior: full
  21. log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
  22. mapper-locations: classpath*:mapper/**/*Mapper.xml
  23. global-config:
  24. # 逻辑删除配置
  25. db-config:
  26. id-type: auto
  27. # 删除前
  28. logic-not-delete-value: 1
  29. # 删除后
  30. logic-delete-value: 0
  31. spring:
  32. main:
  33. allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
  34. autoconfigure:
  35. exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
  36. datasource:
  37. type: com.alibaba.druid.pool.DruidDataSource
  38. # driverClassName: com.mysql.jdbc.Driver
  39. #druid连接池配置
  40. druid:
  41. #主库数据源
  42. master:
  43. url: jdbc:oracle:thin:@192.168.2.215:1521:gdsj
  44. username: gdprod
  45. password: gd123
  46. driver-class-name: oracle.jdbc.driver.OracleDriver
  47. #备数据源 #关闭
  48. slave:
  49. enabled: false
  50. url: jdbc:mysql://localhost:3306/mysql?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=UTC
  51. username: root
  52. password: 123456
  53. #两票数据源
  54. ticket:
  55. url: jdbc:sqlserver://192.168.2.200:1434;DatabaseName=fdeamnew
  56. username: sa
  57. password: ibs
  58. driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
  59. #配置初始化连接数大小
  60. initial-size: 10
  61. # 最大连接数
  62. max-active: 50
  63. #最小连接数
  64. min-idle: 10
  65. #获取连接等待超时时间
  66. max-wait: 5000
  67. pool-prepared-statements: true #是否缓存preparedStatement,也就是PSCache。PSCache对支持游标的数据库性能提升巨大,比如说oracle。在mysql下建议关闭。
  68. max-pool-prepared-statement-per-connection-size: 20
  69. validation-query: SELECT 1 FROM DUAL
  70. validation-query-timeout: 20000
  71. test-on-borrow: false #申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。
  72. test-on-return: false #归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。
  73. test-while-idle: true #建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。
  74. time-between-eviction-runs-millis: 60000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
  75. min-evictable-idle-time-millis: 300000 #一个连接在池中最小生存的时间,单位是毫秒
  76. #StatViewServlet配置。(因为暴露的监控信息比较敏感,支持密码加密和访问ip限定)
  77. stat-view-servlet:
  78. enabled: true
  79. url-pattern: /druid/*
  80. #可以增加访问账号密码【去掉注释就可以】
  81. #login-username: admin
  82. #login-password: admin
  83. filter:
  84. stat:
  85. log-slow-sql: true
  86. slow-sql-millis: 1000
  87. merge-sql: false
  88. wall:
  89. config:
  90. multi-statement-allow: true
  91. servlet:
  92. multipart:
  93. # 开启 multipart 上传功能
  94. enabled: true
  95. # 文件写入磁盘的阈值
  96. file-size-threshold: 2KB
  97. # 最大文件大小
  98. max-file-size: 200MB
  99. # 最大请求大小
  100. max-request-size: 215MB
  101. logging:
  102. level:
  103. root: info
  104. com.example: debug
  105. edos:
  106. baseURL: http://10.0.118.73:8011/ts