application.yml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. ##### 公共 配置 #######
  2. #内置Tomcat容器配置
  3. server:
  4. port: 26001
  5. servlet:
  6. #应用路径,配置应用路径,可方便进行反向代理
  7. context-path: /api_dapp
  8. # context-path: /baseadmin
  9. #基础配置
  10. spring:
  11. profiles:
  12. active: local #${BASE_ADMIN:prod} #选择配置分支,先读取系统环境变量,如果没有则默认值为 prod
  13. application:
  14. name: base-admin
  15. #修改thymeleaf访问根路径
  16. thymeleaf:
  17. prefix: classpath:/view/
  18. cache: false
  19. #mvc接收参数时对日期进行格式化
  20. mvc:
  21. date-format: yyyy-MM-dd HH:mm:ss
  22. servlet:
  23. load-on-startup: 100
  24. #jackson对响应回去的日期参数进行格式化
  25. jackson:
  26. date-format: yyyy-MM-dd HH:mm:ss
  27. time-zone: GMT+8
  28. #打印SQL
  29. jpa:
  30. show-sql: true
  31. # token 参数
  32. jwt:
  33. secret: test # 密钥
  34. expiration: 7200000 # 过期时间
  35. token: Authorization # 请求头
  36. ---
  37. ##### local 配置 #######
  38. spring:
  39. config:
  40. activate:
  41. on-profile: local
  42. #数据库配置
  43. datasource:
  44. url: jdbc:mysql://123.57.252.53:6688/dragon_town_320?useSSL=false&serverTimezone=GMT%2B8&characterEncoding=utf-8
  45. username: root #dragon_town #root
  46. password: 7a829d0ecde828 #FzCebFq6Xy0CDTXJ #zddeiBmp8c5T6TR6
  47. driver-class-name: com.mysql.cj.jdbc.Driver
  48. hikari:
  49. minimum-idle: 5
  50. maximum-pool-size: 15
  51. auto-commit: true
  52. idle-timeout: 30000
  53. max-lifetime: 120000
  54. connection-timeout: 30000
  55. connection-test-query: SELECT 1
  56. redis:
  57. host: 123.57.252.53 #123.57.252.53
  58. port: 6379
  59. password: heihei
  60. data: #工程中只是把redis作为缓存,并未使用redis作为数据持久化存储源repository使用.
  61. redis:
  62. repositories:
  63. enabled: false
  64. # smart redisson
  65. smart-redisson:
  66. database: 12
  67. server-address: 123.57.252.53:6379
  68. password: heihei
  69. #是否需要输入验证码
  70. captcha:
  71. enable: false
  72. apply:
  73. ip: "" #183.52.205.93
  74. ---
  75. ##### dev 配置 #######
  76. spring:
  77. config:
  78. activate:
  79. on-profile: dev
  80. #数据库配置
  81. datasource:
  82. url: jdbc:mysql://42.192.165.168:3306/dragon_town?serverTimezone=GMT%2B8&characterEncoding=utf-8
  83. username: root #dragon_town #root
  84. password: 9ab8fad748dead93 #zddeiBmp8c5T6TR6 #9ab8fad748dead93
  85. driver-class-name: com.mysql.cj.jdbc.Driver
  86. hikari:
  87. minimum-idle: 5
  88. maximum-pool-size: 15
  89. auto-commit: true
  90. idle-timeout: 30000
  91. max-lifetime: 120000
  92. connection-timeout: 30000
  93. connection-test-query: SELECT 1
  94. redis:
  95. host: 42.192.165.168
  96. port: 6379
  97. # lettuce: # 这里标明使用lettuce配置
  98. # pool:
  99. # max-active: 8 #连接池最大连接数(使用负值表示没有限制)
  100. # max-wait: -1ms #连接池最大阻塞等待时间(使用负值表示没有限制)
  101. # max-idle: 8 #连接池中的最大空闲连接
  102. # min-idle: 0 #连接池中的最小空闲连接
  103. # timeout: 10000ms #连接超时时间(毫秒)
  104. password: abc123456abc-test
  105. data: #工程中只是把redis作为缓存,并未使用redis作为数据持久化存储源repository使用.
  106. redis:
  107. repositories:
  108. enabled: false
  109. #是否需要输入验证码
  110. captcha:
  111. enable: true
  112. apply:
  113. ip: 81.69.16.183
  114. ---
  115. ##### prod 配置 #######
  116. spring:
  117. config:
  118. activate:
  119. on-profile: prod
  120. #数据库配置
  121. datasource:
  122. url: jdbc:mysql://localhost:3306/dragon_town?serverTimezone=GMT%2B8&characterEncoding=utf-8
  123. username: ""
  124. password: ""
  125. driver-class-name: com.mysql.cj.jdbc.Driver
  126. hikari:
  127. minimum-idle: 5
  128. maximum-pool-size: 15
  129. auto-commit: true
  130. idle-timeout: 30000
  131. max-lifetime: 120000
  132. connection-timeout: 30000
  133. connection-test-query: SELECT 1
  134. redis:
  135. host: 127.0.0.1
  136. port: 6379
  137. password: ""
  138. data: #工程中只是把redis作为缓存,并未使用redis作为数据持久化存储源repository使用.
  139. redis:
  140. repositories:
  141. enabled: false
  142. #是否需要输入验证码
  143. captcha:
  144. enable: true
  145. apply:
  146. ip: ""