application.yml 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. server:
  2. port: 9201
  3. spring:
  4. profiles:
  5. active: dev
  6. application:
  7. name: micro-oauth2-gateway
  8. cloud:
  9. nacos:
  10. discovery:
  11. server-addr: localhost:8848
  12. gateway:
  13. routes: #配置路由路径
  14. - id: oauth2-api-route
  15. uri: lb://micro-oauth2-api
  16. predicates:
  17. - Path=/api/**
  18. filters:
  19. - StripPrefix=1
  20. - id: oauth2-auth-route
  21. uri: lb://micro-oauth2-auth
  22. predicates:
  23. - Path=/auth/**
  24. filters:
  25. - StripPrefix=1
  26. discovery:
  27. locator:
  28. enabled: true #开启从注册中心动态创建路由的功能
  29. lower-case-service-id: true #使用小写服务名,默认是大写
  30. security:
  31. oauth2:
  32. resourceserver:
  33. jwt:
  34. jwk-set-uri: 'http://localhost:9401/rsa/publicKey' #配置RSA的公钥访问地址
  35. redis:
  36. database: 0
  37. port: 6379
  38. host: localhost
  39. password: 123456
  40. secure:
  41. ignore:
  42. urls: #配置白名单路径
  43. - "/actuator/**"
  44. - "/auth/oauth/token"