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

54 lines
1.7 KiB
YAML
Raw Normal View History

2024-01-21 17:37:03 +08:00
server:
port: 8080
spring:
application:
name: api-service
# 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-01-22 18:48:10 +08:00
- id: tao_api_route
uri: lb://tao-api
predicates:
2024-01-22 18:48:10 +08:00
- Path=/api/tao-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
# - 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模式