找不到类型为'org.springframework.http.codec.ServerCodecConfigurer'的bean [英] bean of type 'org.springframework.http.codec.ServerCodecConfigurer' that could not be found

查看:2239
本文介绍了找不到类型为'org.springframework.http.codec.ServerCodecConfigurer'的bean的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

申请无法开始

说明:

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

Parameter 0 of method modifyRequestBodyGatewayFilterFactory in org.springframework.cloud.gateway.config.GatewayAutoConfiguration required a bean of type 'org.springframework.http.codec.ServerCodecConfigurer' that could not be found.

动作:

考虑在您的配置中定义类型为'org.springframework.http.codec.ServerCodecConfigurer'的bean.

Consider defining a bean of type 'org.springframework.http.codec.ServerCodecConfigurer' in your configuration.

拾取了JAVA_TOOL_OPTIONS:-agentlib:jvmhook
拾取了_JAVA_OPTIONS:-Xbootclasspath/a:"C:\ Program Files(x86)\ HPE \ Unified Functional Testing \ bin \ java_shared \ classes \ jasmine.jar"
捡起JAVA_TOOL_OPTIONS:-agentlib:jvmhook

Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook
Picked up _JAVA_OPTIONS: -Xbootclasspath/a:"C:\Program Files (x86)\HPE\Unified Functional Testing\bin\java_shared\classes\jasmine.jar"
Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook

推荐答案

尝试添加以下代码.它对我有用

Try adding the below code. It worked for me

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

这篇关于找不到类型为'org.springframework.http.codec.ServerCodecConfigurer'的bean的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆