bootstrap.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. ##上面是基础配置,不用上配置中心那种
  28. ##下面是环境区分,主要不同环境不同文件获取
  29. ---
  30. #测试环境
  31. spring:
  32. profiles: sit
  33. #数据库配置
  34. datasource:
  35. url: jdbc:mysql://rm-wz995mu26a1479kz0so.mysql.rds.aliyuncs.com:3306/orderdb
  36. username: root
  37. password: sunzee@020
  38. driver-class-name: com.mysql.jdbc.Driver
  39. #注册中心
  40. eureka:
  41. client:
  42. serviceUrl:
  43. defaultZone: http://120.25.151.99:49001/eureka/
  44. register-with-eureka: true
  45. # register-with-eureka: false
  46. instance:
  47. prefer-ip-address: true
  48. ip-address: 120.25.151.99
  49. ---
  50. ##正式环境
  51. spring:
  52. profiles: prod
  53. #数据库配置
  54. datasource:
  55. url: jdbc:mysql://rm-wz995mu26a1479kz0.mysql.rds.aliyuncs.com:3306/orderdb
  56. username: root
  57. password: sunzee@020
  58. driver-class-name: com.mysql.jdbc.Driver
  59. #注册中心
  60. eureka:
  61. client:
  62. serviceUrl:
  63. defaultZone: http://10.0.0.153:49001/eureka/,http://10.0.0.152:49001/eureka/
  64. register-with-eureka: true
  65. instance:
  66. prefer-ip-address: true