bootstrap.yml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. spring:
  2. application:
  3. name: szwl-server
  4. profiles:
  5. # 打包或运行时,换这里:sit测试,prod正式
  6. active: prod
  7. cloud:
  8. config:
  9. name: szwl-server
  10. discovery:
  11. service-id: config-server
  12. # 是否获取配置中心配置
  13. enabled: true
  14. # 项目端口
  15. server:
  16. port: 49011
  17. maxPostSize: -1
  18. maxHttpHeaderSize: 1024000
  19. management:
  20. endpoints:
  21. web:
  22. exposure:
  23. include: refresh
  24. mybatis-plus:
  25. mapper-locations: classpath:com/szwl/mapper/xml/*.xml
  26. swagger:
  27. url: /v2/api-docs,/swagger-resources,/swagger-resources/**,/configuration/ui,/configuration/security,/swagger-ui.html/**,/webjars/**,/doc.html,/doc.html/**,/*.html,/**.html,/**/*.html,/**/*.css,/**/*.js,/sys/api/list,/sys/user/batch,/sys/org/batch
  28. logging:
  29. file:
  30. name: /app/applogs/${spring.application.name}/${spring.application.name}.log
  31. path: /app/applogs/${spring.application.name}/${spring.application.name}.log
  32. max-size: 100MB
  33. level:
  34. com.szwl: debug
  35. ##上面是基础配置,不用上配置中心那种
  36. ##下面是环境区分,主要不同环境不同文件获取
  37. ---
  38. #测试环境
  39. spring:
  40. profiles: sit
  41. #数据库配置
  42. datasource:
  43. url: jdbc:mysql://rm-wz995mu26a1479kz0so.mysql.rds.aliyuncs.com:3306/szwl-test
  44. username: root
  45. password: sunzee@020
  46. driver-class-name: com.mysql.jdbc.Driver
  47. #注册中心
  48. eureka:
  49. client:
  50. serviceUrl:
  51. defaultZone: http://120.25.151.99:49001/eureka/
  52. register-with-eureka: true
  53. instance:
  54. prefer-ip-address: true
  55. ip-address: 120.25.151.99
  56. ---
  57. ##正式环境
  58. spring:
  59. profiles: prod
  60. #数据库配置
  61. datasource:
  62. url: jdbc:mysql://rm-wz995mu26a1479kz0.mysql.rds.aliyuncs.com:3306/szwl
  63. username: root
  64. password: sunzee@020
  65. driver-class-name: com.mysql.jdbc.Driver
  66. #注册中心
  67. eureka:
  68. client:
  69. serviceUrl:
  70. defaultZone: http://112.74.63.148:49001/eureka/,http://47.112.127.131:49001/eureka/
  71. register-with-eureka: true
  72. instance:
  73. prefer-ip-address: true