qihang-ecom-erp-open/gateway/src/main/resources/application.yaml

67 lines
1.9 KiB
YAML
Raw Normal View History

2024-01-21 17:37:03 +08:00
server:
port: 8080
spring:
application:
2025-01-08 13:31:20 +08:00
name: gateway
# 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-03-02 10:58:51 +08:00
sentinel:
transport:
dashboard: 127.0.0.1:8888 # sentinel控制台地址
2024-01-21 17:37:03 +08:00
gateway:
discovery:
locator:
enabled: true
routes:
2024-03-11 14:15:25 +08:00
- id: oms_api_route
uri: lb://oms-api
predicates:
- Path=/api/oms-api/**
filters:
- StripPrefix=2
- id: open_api_route
uri: lb://open-api
predicates:
- Path=/api/open-api/**
filters:
- StripPrefix=2
2024-02-26 19:15:34 +08:00
- id: sys_api_route
uri: lb://sys-api
2024-01-21 17:37:03 +08:00
predicates:
2024-02-26 19:15:34 +08:00
- Path=/api/sys-api/**
2024-01-21 17:37:03 +08:00
filters:
- StripPrefix=2
2025-01-08 13:31:20 +08:00
# - 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:
2024-08-04 15:38:00 +08:00
# - pattern: /api/tao-service/** # 定义需要授权的URL模式
2025-01-04 21:11:57 +08:00
#eureka:
# client:
# serviceUrl:
# defaultZone: http://127.0.0.1:8761/eureka/