Gateway整合Nacos前端请求报错404 NOT_FOUNT
在使用gateway整合nacos时请求报404 NOT_FOUNT
不清楚为什么datasource.yaml会报红?
通过DeBug跑的话,前端发送请求,后面网关拦截到的就是ex:"org.springframework.web.server.ResponseStatusException: 404 NOT_FOUNT"
这是在Nacos上的router.yaml文件
spring:
cloud:
gateway:
# 客户端超时
httpclient:
connect-timeout: 10000
response-timeout: 20s
globalcors:
# 跨域设置
cors-configurations:
'[/**]':
allowedOrigins: "*"
allowedMethods:
- GET
- POST
- PUT
- DELETE
routes:
# oauth
- id: ilinks-oauth
uri: lb://ilinks-oauth
# 断言
predicates:
- Path=/oauth/**
# 过滤器
filters:
- StripPrefix=2
# thirdparty
- id: ilinks-thirdparty
uri: lb://ilinks-third-server
# uri: http://localhost:30002
predicates:
- Path=/api/system/third/**
filters:
- StripPrefix=2
- PrefixPath=/Permission
# scheduletask
- id: ilinks-system-scheduletask
uri: lb://ilinks-system
# uri: http://localhost:30002
predicates:
- Path=/api/scheduletask/**
filters:
- StripPrefix=2
- PrefixPath=/ScheduleTask
# system-permission
- id: ilinks-system-permission
uri: lb://ilinks-system
# uri: http://localhost:30002
predicates:
- Path=/api/permission/**
filters:
- StripPrefix=2
- PrefixPath=/Permission
# system-message
- id: ilinks-system-message
uri: lb://ilinks-system
# uri: http://localhost:30002
predicates:
- Path=/api/message/**
filters:
- StripPrefix=2
- PrefixPath=/Message
- id: ilinks-system
uri: lb://ilinks-system
# uri: http://localhost:30002
predicates:
- Path=/api/system/**
filters:
- StripPrefix=2
- PrefixPath=/Base
- id: ilinks-visualdev
uri: lb://ilinks-visualdev
# uri: http://localhost:30003
predicates:
- Path=/api/visualdev/**
filters:
- StripPrefix=2
- id: ilinks-workflow
uri: lb://ilinks-workflow
# uri: http://localhost:30004
predicates:
- Path=/api/workflow/**
filters:
- StripPrefix=2
- id: ilinks-file
uri: lb://ilinks-file
# uri: http://localhost:30005
predicates:
- Path=/api/file/**
filters:
- StripPrefix=2
- id: ilinks-tenant
uri: lb://ilinks-tenant
# uri: http://localhost:30006
predicates:
- Path=/api/tenant/**
filters:
- StripPrefix=2
希望有懂的大佬可以不吝指教,解一下小弟的困惑,感激不尽!!!
更多推荐
所有评论(0)