Files
base/jero-boot/jero-cloud-module/jero-cloud-gateway/src/main/resources/application.yml
T

61 lines
1.8 KiB
YAML

server:
port: 9999
spring:
application:
name: jero-gateway
cloud:
gateway:
discovery:
locator:
enabled: true
globalcors:
cors-configurations:
'[/**]':
allowCredentials: true
allowedOrigins: "*"
allowedMethods: "*"
allowedHeaders: "*"
#如果启用nacos或者数据库配置请删除一下配置
routes:
- id: jero-demo
uri: lb://jero-demo
predicates:
- Path=/mock/**,/test/**,/bigscreen/template1/**,/bigscreen/template2/**
- id: jero-system
uri: lb://jero-system
predicates:
- Path=/sys/**,/eoa/**,/v1/**,/joa/**,/online/**,/bigscreen/**,/jmreport/**,/desform/**,/act/**,/plug-in/**,/generic/**
- id: jero-system-websocket
uri: lb:ws://jero-system
predicates:
- Path=/websocket/**,/eoaSocket/**,/newsWebsocket/**
- id: jero-demo-websocket
uri: lb:ws://jero-demo
predicates:
- Path=/vxeSocket/**
# 全局熔断降级配置
default-filters:
- name: Hystrix
args:
name: default
#转发地址
fallbackUri: 'forward:/fallback'
- name: Retry
args:
#重试次数,默认值是 3 次
retries: 3
#HTTP 的状态返回码
statuses: BAD_GATEWAY,BAD_REQUEST
#指定哪些方法的请求需要进行重试逻辑,默认值是 GET 方法
methods: GET,POST
# hystrix 信号量隔离,3秒后自动超时
hystrix:
enabled: true
shareSecurityContext: true
command:
default:
execution:
isolation:
strategy: SEMAPHORE
thread:
timeoutInMilliseconds: 3000