server: port: 8080 spring: application: name: api-service # security: # user: # name: admin # password: password basic: enabled: true cloud: nacos: discovery: server-addr: 127.0.0.1:8848 # username: nacos # password: nacos sentinel: transport: dashboard: 127.0.0.1:8888 # sentinel控制台地址 gateway: discovery: locator: enabled: true routes: - id: oms_api_route uri: lb://oms-api predicates: - Path=/api/oms-api/** filters: - StripPrefix=2 - id: tao_api_route uri: lb://tao-api predicates: - Path=/api/tao-api/** filters: - StripPrefix=2 - id: jd_api_route uri: lb://jd-api predicates: - Path=/api/jd-api/** filters: - StripPrefix=2 - id: sys_api_route uri: lb://sys-api predicates: - Path=/api/sys-api/** filters: - StripPrefix=2 - id: dou_api_route uri: lb://dou-api predicates: - Path=/api/dou-api/** filters: - StripPrefix=2 - id: pdd_api_route uri: lb://pdd-api predicates: - Path=/api/pdd-api/** filters: - StripPrefix=2 - id: wei_api_route uri: lb://wei-api predicates: - Path=/api/wei-api/** filters: - StripPrefix=2 # - TokenFilter # default-filters: # - TokenFilter # - name: Security # 添加安全过滤器 # args: # springSecurityFilterChain: # 配置Spring Security过滤器链 # order: 0 # securityMatcher: org.springframework.security.web.util.matcher.AntPathRequestMatcher # securityFilter: org.springframework.security.web.server.SecurityWebFilterChainFilter # securityContextRepository: org.springframework.security.web.server.context.ServerSecurityContextRepository # serverAccessDeniedHandler: org.springframework.security.web.server.access.AccessDeniedHandlerImpl # serverAuthenticationEntryPoint: org.springframework.security.web.server.authentication.BasicAuthenticationEntryPoint ## 授权规则 #security: # rules: # - pattern: /api/tao-service/** # 定义需要授权的URL模式 #eureka: # client: # serviceUrl: # defaultZone: http://127.0.0.1:8761/eureka/