application.yml 920 B

12345678910111213141516171819202122232425262728293031323334353637
  1. server:
  2. port: 8000
  3. spring:
  4. application:
  5. name: user-service # 项目名称尽量用小写
  6. datasource:
  7. name: test
  8. url: jdbc:mysql://192.168.16.137:3306/test
  9. username: root
  10. password: 123456
  11. #使用druid数据源
  12. type: com.alibaba.druid.pool.DruidDataSource
  13. driver-class-name: com.mysql.jdbc.Driver
  14. filters: stat
  15. maxActive: 20
  16. initialSize: 1
  17. maxWait: 60000
  18. minIdle: 1
  19. timeBetweenEvictionRunsMillis: 60000
  20. minEvictableIdleTimeMillis: 300000
  21. validationQuery: select 'x'
  22. testWhileIdle: true
  23. testOnBorrow: false
  24. testOnReturn: false
  25. poolPreparedStatements: true
  26. maxOpenPreparedStatements: 20
  27. logging:
  28. level:
  29. root: INFO
  30. com.java110.user: ERROR
  31. eureka:
  32. client:
  33. serviceUrl:
  34. defaultZone: http://discovery:8761/eureka/ # 指定注册中心的地址, http://discovery:8762/eureka/
  35. instance:
  36. preferIpAddress: true