GateWay500异常:org.springframework.core.io.buffer.DefaultDataBufferFactory cannot be
原因是:引入的依赖中有spring-web等依赖,排除或者删除掉这些依赖,gateway就能正常运行了!GateWay仅仅需要。可以看到通过网关访问成功!
·
报错截图:
java.lang.ClassCastException: org.springframework.core.io.buffer.DefaultDataBufferFactory cannot be cast to org.springframework.core.io.buffer.NettyDataBufferFactory
at org.springframework.cloud.gateway.filter.NettyWriteResponseFilter.lambda$filter$1(NettyWriteResponseFilter.java:82) ~[spring-cloud-gateway-core-2.2.0.RELEASE.jar:2.2.0.RELEASE]
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Error has been observed at the following site(s):
|_ checkpoint ⇢ org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter [DefaultWebFilterChain]
|_ checkpoint ⇢ HTTP GET "/eduservice/teacher/findAll" [ExceptionHandlingWebHandler]
原因是:引入的依赖中有spring-web等依赖,排除或者删除掉这些依赖,gateway就能正常运行了!GateWay仅仅需要spring-cloud-starter-gateway
可以看到通过网关访问成功!

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐
所有评论(0)