在使用getway 网关跨域失败分析
1. 分析是否关闭了nginx 的关联端口请求
2. 分析跨域文件,开启跨域文件的时候关闭@CrossOrigin。
3. 分析报错
如果出现下面这种
java.lang.IllegalStateException: Invalid host: lb://service_hosp
应该可能工程路径不能包含下划线,下划线为非法字符,改为-或其他字符即可。
、、、
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Error has been observed at the following site(s):
|_ checkpoint ⇢ org.springframework.web.cors.reactive.CorsWebFilter [DefaultWebFilterChain]
|_ checkpoint ⇢ org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter [DefaultWebFilterChain]
|_ checkpoint ⇢ HTTP POST "/admin/hosp/hospitalSet/findPageHospSet/1/3" [ExceptionHandlingWebHandler]
Stack trace:
Caused by: java.net.ConnectException: Connection refused: no further information
、、、
感谢原博主灵感。
https://blog.csdn.net/saygood999/article/details/118723361