bootstrap.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. instance:
  46. prefer-ip-address: true
  47. ip-address: 120.25.151.99
  48. ---
  49. ##正式环境
  50. spring:
  51. profiles: prod
  52. #数据库配置
  53. datasource:
  54. url: jdbc:mysql://rm-wz995mu26a1479kz0.mysql.rds.aliyuncs.com:3306/orderdb
  55. username: root
  56. password: sunzee@020
  57. driver-class-name: com.mysql.jdbc.Driver
  58. #注册中心
  59. eureka:
  60. client:
  61. serviceUrl:
  62. defaultZone: http://10.0.0.153:49001/eureka/,http://10.0.0.152:49001/eureka/
  63. register-with-eureka: true
  64. instance:
  65. prefer-ip-address: true