application.yml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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. profiles: local
  40. #数据库配置
  41. datasource:
  42. url: jdbc:mysql://123.57.252.53:6688/dragon_town?useSSL=false&serverTimezone=GMT%2B8&characterEncoding=utf-8
  43. username: root #dragon_town #root
  44. password: FzCebFq6Xy0CDTXJ #zddeiBmp8c5T6TR6 #9ab8fad748dead93
  45. driver-class-name: com.mysql.cj.jdbc.Driver
  46. hikari:
  47. minimum-idle: 5
  48. maximum-pool-size: 15
  49. auto-commit: true
  50. idle-timeout: 30000
  51. max-lifetime: 120000
  52. connection-timeout: 30000
  53. connection-test-query: SELECT 1
  54. redis:
  55. host: 123.57.252.53
  56. port: 6379
  57. password: heihei
  58. data: #工程中只是把redis作为缓存,并未使用redis作为数据持久化存储源repository使用.
  59. redis:
  60. repositories:
  61. enabled: false
  62. #是否需要输入验证码
  63. captcha:
  64. enable: false
  65. ---
  66. ##### dev 配置 #######
  67. spring:
  68. profiles: dev
  69. #数据库配置
  70. datasource:
  71. url: jdbc:mysql://42.192.165.168:3306/dragon_town?serverTimezone=GMT%2B8&characterEncoding=utf-8
  72. username: root #dragon_town #root
  73. password: 9ab8fad748dead93 #zddeiBmp8c5T6TR6 #9ab8fad748dead93
  74. driver-class-name: com.mysql.cj.jdbc.Driver
  75. hikari:
  76. minimum-idle: 5
  77. maximum-pool-size: 15
  78. auto-commit: true
  79. idle-timeout: 30000
  80. max-lifetime: 120000
  81. connection-timeout: 30000
  82. connection-test-query: SELECT 1
  83. redis:
  84. host: 42.192.165.168
  85. port: 6379
  86. # lettuce: # 这里标明使用lettuce配置
  87. # pool:
  88. # max-active: 8 #连接池最大连接数(使用负值表示没有限制)
  89. # max-wait: -1ms #连接池最大阻塞等待时间(使用负值表示没有限制)
  90. # max-idle: 8 #连接池中的最大空闲连接
  91. # min-idle: 0 #连接池中的最小空闲连接
  92. # timeout: 10000ms #连接超时时间(毫秒)
  93. password: abc123456abc-test
  94. data: #工程中只是把redis作为缓存,并未使用redis作为数据持久化存储源repository使用.
  95. redis:
  96. repositories:
  97. enabled: false
  98. #是否需要输入验证码
  99. captcha:
  100. enable: true
  101. ---
  102. ##### prod 配置 #######
  103. spring:
  104. profiles: prod
  105. #数据库配置
  106. datasource:
  107. url: jdbc:mysql://localhost:3306/dragon_town?serverTimezone=GMT%2B8&characterEncoding=utf-8
  108. username: ""
  109. password: ""
  110. driver-class-name: com.mysql.cj.jdbc.Driver
  111. hikari:
  112. minimum-idle: 5
  113. maximum-pool-size: 15
  114. auto-commit: true
  115. idle-timeout: 30000
  116. max-lifetime: 120000
  117. connection-timeout: 30000
  118. connection-test-query: SELECT 1
  119. redis:
  120. host: 127.0.0.1
  121. port: 6379
  122. password: ""
  123. data: #工程中只是把redis作为缓存,并未使用redis作为数据持久化存储源repository使用.
  124. redis:
  125. repositories:
  126. enabled: false
  127. #是否需要输入验证码
  128. captcha:
  129. enable: true