spring:
|
application:
|
name: iplatform-gateway
|
cloud:
|
gateway:
|
discovery:
|
locator:
|
# true 默认路由机制
|
# 开启服务注册和发现功能,服务网关自动根据服务发现为每一个服务创建一个路由,这个路由将以(大写服务名)开头的请求路径转发到对应的服务中
|
# 访问地址:127.0.0.1:8800/大写服务名/服务上下文/Controller/Method
|
#
|
# false 关闭默认路由机制,需要手动配置routes,默认通过路由名进行跳转的方式将失效,将请求路径上的服务名配置为小写
|
# 访问地址:127.0.0.1:8800/小写写服务名/服务上下文/Controller/Method
|
enabled: false
|
lower-case-service-id: true
|
routes:
|
- id: iplatform-base-admin
|
uri: lb://iplatform-base-admin
|
predicates:
|
- Path=/admin/**
|
# - Path=/system/**
|
# - Path=/login
|
# - Path=/captchaImage
|
# - Path=/getInfo
|
# - Path=/getRouters
|
# - Path=/logout
|
filters:
|
# 路径裁剪一级,即: 把'admin'裁剪掉
|
# - StripPrefix=1
|
- RewritePath=/admin/(?<segment>.*), /$\{segment}
|
|
# globalcors:
|
# # 解决options请求被拦截问题
|
# add-to-simple-url-handler-mapping: true
|
# cors-configurations:
|
# '[/**]':
|
# allowedOrigins: # 允许哪些网站的跨域请求
|
# - "http://localhost:8090"
|
# allowedMethods: # 允许的跨域ajax的请求方式
|
# - "GET"
|
# - "POST"
|
# allowedHeaders: "*" # 允许在请求中携带的头信息
|
# allowCredentials: true # 是否允许携带cookie
|
# maxAge: 360000 # 这次跨域检测的有效期
|
|
nacos:
|
discovery:
|
server-addr: 116.198.39.83:8648
|
|
server:
|
port: 8082
|
|
logging:
|
level:
|
root: info
|
org:
|
springframework: info
|
com:
|
# walker: debug
|
iplatform: debug
|