application.yaml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. spring.profiles.active: dev
  2. spring:
  3. cache:
  4. guava:
  5. spec: expireAfterWrite=30s
  6. datasource:
  7. driver-class-name: com.mysql.jdbc.Driver
  8. # Keep the connection alive if idle for a long time (needed in production)
  9. testWhileIdle: true
  10. validationQuery: SELECT 1
  11. # Show or not log for each sql query
  12. jpa:
  13. show-sql: true
  14. # Hibernate ddl auto (create, create-drop, update)
  15. hibernate:
  16. ddl-auto: validate
  17. #hbm2ddl.auto: update
  18. # Naming strategy
  19. naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
  20. # The SQL dialect makes Hibernate generate better SQL for the chosen database
  21. properties.hibernate.dialect: org.hibernate.dialect.MySQL5Dialect
  22. ---
  23. # 开发环境
  24. spring:
  25. profiles: dev
  26. datasource:
  27. driverClassName: com.mysql.jdbc.Driver
  28. url: jdbc:mysql://127.0.0.1:3306/mooctest_user?useUnicode=yes&characterEncoding=UTF-8
  29. username: root
  30. password: zhangxin
  31. dubbo:
  32. application.name: user-service-provider
  33. registry.address: zookeeper://118.178.131.206:2181
  34. protocol.name: dubbo
  35. protocol.port: 20900
  36. # protocol.host: 127.0.0.1
  37. scan: cn.iselab.mooctest.user.rpc
  38. monitor.protocal: registry
  39. provider.timeout: 120000
  40. # provider.retries: 0
  41. server:
  42. port: 8081
  43. mybatis:
  44. typeAliasesPackage: cn.iselab.mooctest.user.model
  45. logging.config: classpath:log4j2.yaml
  46. ---
  47. # 测试服务环境
  48. spring:
  49. profiles: test
  50. datasource:
  51. url: jdbc:mysql://101.37.175.111:3306/mooctest_user?useUnicode=yes&characterEncoding=UTF-8 # please modify manually
  52. username: mooctest # please modify manually
  53. password: secr3t! # please modify manually
  54. dubbo:
  55. application.name: user-service-provider
  56. registry.address: zookeeper://101.37.175.111:2181
  57. protocol.name: dubbo
  58. protocol.port: 20900
  59. protocol.host: 101.37.175.111
  60. scan: cn.iselab.mooctest.user.rpc
  61. monitor.protocal: registry
  62. provider.timeout: 120000
  63. provider.retries: 0
  64. server:
  65. port: 8191
  66. logging.config: classpath:log4j2.test.yaml
  67. logging.access.directory: /home/share/log
  68. spring.jpa.show-sql: false
  69. ---
  70. # 线上服务环境
  71. spring:
  72. profiles: online
  73. datasource:
  74. url: jdbc:mysql://127.0.0.1:3306/mooctest_user?useUnicode=yes&characterEncoding=UTF-8
  75. username: mooctest
  76. password: secr3t!
  77. dubbo:
  78. application.name: user-service-provider
  79. registry.address: zookeeper://118.178.131.206:2181
  80. protocol.name: dubbo
  81. protocol.port: 20890
  82. protocol.host:
  83. scan: cn.iselab.mooctest.user.rpc
  84. monitor.protocal: registry
  85. provider.timeout: 120000
  86. provider.retries: 0
  87. server:
  88. port: 8191
  89. logging.config: classpath:log4j2.online.yaml
  90. logging.access.directory: /home/share/log
  91. spring.jpa.show-sql: false