bootstrap.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. spring:
  2. application:
  3. name: order-server
  4. profiles:
  5. # 打包或运行时,换这里:sit测试,prod正式
  6. active: sit
  7. cloud:
  8. config:
  9. name: order-server
  10. discovery:
  11. service-id: config-server
  12. # 是否获取配置中心配置
  13. enabled: true
  14. # 项目端口
  15. server:
  16. port: 49012
  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-test
  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. # 本地测试的时候改成 false
  46. # register-with-eureka: false
  47. instance:
  48. prefer-ip-address: true
  49. ip-address: 120.25.151.99
  50. ---
  51. ##正式环境
  52. spring:
  53. profiles: prod
  54. #数据库配置
  55. datasource:
  56. url: jdbc:mysql://rm-wz995mu26a1479kz0.mysql.rds.aliyuncs.com:3306/orderdb
  57. username: root
  58. password: sunzee@020
  59. driver-class-name: com.mysql.jdbc.Driver
  60. #注册中心
  61. eureka:
  62. client:
  63. serviceUrl:
  64. defaultZone: http://10.0.0.153:49001/eureka/,http://10.0.0.152:49001/eureka/
  65. register-with-eureka: true
  66. instance:
  67. prefer-ip-address: true