bootstrap.yml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. spring:
  2. application:
  3. name: pay-server
  4. profiles:
  5. # 打包或运行时,换这里:sit测试,prod正式
  6. active: sit
  7. cloud:
  8. config:
  9. name: pay-server
  10. discovery:
  11. service-id: config-server
  12. # 是否获取配置中心配置
  13. enabled: true
  14. # 项目端口
  15. server:
  16. port: 49013
  17. management:
  18. endpoints:
  19. web:
  20. exposure:
  21. include: refresh
  22. mybatis-plus:
  23. mapper-locations: classpath:com/szwl/mapper/xml/*.xml
  24. logging:
  25. level:
  26. com.szwl: debug
  27. oauth:
  28. wx:
  29. # 测试帐号
  30. # appID: wx6959f112e9ffbfa3
  31. # appSecret: 32f6fdf12bc25361110e1786f386eaab
  32. # 正式账户
  33. appID: wxcd5b1b2636c9f611
  34. appSecret: e2854aa99f8279f33b4f065b2ffb75b1
  35. ##上面是基础配置,不用上配置中心那种
  36. ##下面是环境区分,主要不同环境不同文件获取
  37. ---
  38. #测试环境
  39. spring:
  40. profiles: sit
  41. #数据库配置
  42. datasource:
  43. url: jdbc:mysql://rm-wz995mu26a1479kz0so.mysql.rds.aliyuncs.com:3306/orderdb-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. # register-with-eureka: false
  54. instance:
  55. prefer-ip-address: true
  56. ip-address: 120.25.151.99
  57. ---
  58. ##正式环境
  59. spring:
  60. profiles: prod
  61. #数据库配置
  62. datasource:
  63. url: jdbc:mysql://rm-wz995mu26a1479kz0.mysql.rds.aliyuncs.com:3306/orderdb
  64. username: root
  65. password: sunzee@020
  66. driver-class-name: com.mysql.jdbc.Driver
  67. #注册中心
  68. eureka:
  69. client:
  70. serviceUrl:
  71. defaultZone: http://10.0.0.153:49001/eureka/,http://10.0.0.152:49001/eureka/
  72. register-with-eureka: true
  73. instance:
  74. prefer-ip-address: true