2024-01-21 17:37:03 +08:00
|
|
|
server:
|
|
|
|
|
port: 8080
|
|
|
|
|
spring:
|
|
|
|
|
application:
|
|
|
|
|
name: api-service
|
2024-01-22 14:35:36 +08:00
|
|
|
# security:
|
|
|
|
|
# user:
|
|
|
|
|
# name: admin
|
|
|
|
|
# password: password
|
2024-01-21 18:46:58 +08:00
|
|
|
basic:
|
|
|
|
|
enabled: true
|
2024-01-21 17:37:03 +08:00
|
|
|
cloud:
|
|
|
|
|
nacos:
|
|
|
|
|
discovery:
|
|
|
|
|
server-addr: 127.0.0.1:8848
|
2024-01-21 18:18:09 +08:00
|
|
|
# username: nacos
|
|
|
|
|
# password: nacos
|
2024-01-21 17:37:03 +08:00
|
|
|
gateway:
|
|
|
|
|
discovery:
|
|
|
|
|
locator:
|
|
|
|
|
enabled: true
|
|
|
|
|
routes:
|
2024-01-22 18:48:10 +08:00
|
|
|
- id: tao_api_route
|
|
|
|
|
uri: lb://tao-api
|
2024-01-22 14:35:36 +08:00
|
|
|
predicates:
|
2024-01-22 18:48:10 +08:00
|
|
|
- Path=/api/tao-api/**
|
2024-01-22 14:35:36 +08:00
|
|
|
filters:
|
|
|
|
|
- StripPrefix=2
|
|
|
|
|
- id: oms_api_route
|
|
|
|
|
uri: lb://oms-api
|
2024-01-21 17:37:03 +08:00
|
|
|
predicates:
|
2024-01-22 14:35:36 +08:00
|
|
|
- Path=/api/oms-api/**
|
2024-01-21 17:37:03 +08:00
|
|
|
filters:
|
2024-01-22 14:35:36 +08:00
|
|
|
- StripPrefix=2
|
|
|
|
|
# - TokenFilter
|
|
|
|
|
# default-filters:
|
|
|
|
|
# - TokenFilter
|
2024-01-21 18:46:58 +08:00
|
|
|
# - 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模式
|