No qualifying bean of type ‘org.springframework.boot.autoconfigure.http.HttpMessageConverters‘ avail

1.报错如下:

No qualifying bean of type ‘org.springframework.boot.autoconfigure.http.HttpMessageConverters‘ avail_第1张图片

还是因为找不到配置的bean,要手动去配置一个config类去说明

@Configuration
public class FeignConfig {
    @Bean
    @ConditionalOnMissingBean
    public HttpMessageConverters messageConverters(ObjectProvider> converters) {
        return new HttpMessageConverters(converters.orderedStream().collect(Collectors.toList()));
    }
}

 

你可能感兴趣的:(杂谈,中间件,云开发项目,spring,boot,后端,java,fegin)