0

我在使用支持 spring cloud api gateway 的 spring boot 项目运行 jhipster 7.1.0 api gateway 时遇到问题。

我的脚步

  1. 在 cmd 中运行 mvnw 。[这里][1]

    org.springframework.cloud.gateway.config.GatewayAutoConfiguration 中方法 modifyRequestBodyGatewayFilterFactory 的参数 0 需要找不到类型为“org.springframework.http.codec.ServerCodecConfigurer”的 bean。

  2. 然后我通过添加像 [here][2] 这样的配置 bean 解决了上述消息。

@Bean public ServerCodecConfigurer serverCodecConfigurer() {
return ServerCodecConfigurer.create(); }

  1. 下一条消息出现 [这里][3]

在类路径中发现 Spring MVC,与 Spring Cloud Gateway 不兼容。行动:请设置 spring.main.web-application-type=reactive 或删除 spring-boot-starter-web 依赖项。

  1. 然后我通过在 application.properties 添加 spring.main.web-application-type=reactive 解决了上述消息

  2. 出现下一条消息

构造函数的参数0 in

org.zalando.problem.spring.web.advice.security.SecurityProblemSupport

需要一个找不到的“org.springframework.web.servlet.HandlerExceptionResolver”类型的bean。行动:考虑在你的配置中定义一个“org.springframework.web.servlet.HandlerExceptionResolver”类型的bean。

我卡在这里我该如何解决这个问题请帮忙。[1] : https ://i.stack.imgur.com/Gi7O6.png [ 2 ]: https ://i.stack.imgur.com/wjZDf.png [3]:https://i.stack。 imgur.com/UPZv9.png

4

0 回答 0