Version

org.springframework.cloud:spring-cloud-dependencies:Hoxton.SR1 org.springframework.boot:spring-boot-autoconfigure:2.2.2.RELEASE org.springframework:spring-webflux:5.2.2.RELEASE

Exception

aused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.boot.autoconfigure.http.HttpMessageConverters' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1695)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1253)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory$DependencyObjectProvider.getObject(DefaultListableBeanFactory.java:1879)
    at org.springframework.cloud.openfeign.support.SpringDecoder.decode(SpringDecoder.java:57)
    at org.springframework.cloud.openfeign.support.ResponseEntityDecoder.decode(ResponseEntityDecoder.java:62)
    at feign.optionals.OptionalDecoder.decode(OptionalDecoder.java:36)
    at feign.SynchronousMethodHandler.decode(SynchronousMethodHandler.java:178)
    ... 33 common frames omitted

Investigate

I tried to print debug information.

   HttpMessageConvertersAutoConfiguration:
      Did not match:
         - NoneNestedConditions 1 matched 0 did not; NestedCondition on HttpMessageConvertersAutoConfiguration.NotReactiveWebApplicationCondition.ReactiveWebApplication found ConfigurableReactiveWebEnvironment (HttpMessageConvertersAutoConfiguration.NotReactiveWebApplicationCondition)
      Matched:
         - @ConditionalOnClass found required class 'org.springframework.http.converter.HttpMessageConverter' (OnClassCondition)

I read the source code HttpMessageConvertersAutoConfiguration.java and found the difference between Spring Boot 2.1.6 and 2.2.2. This codes was added:

    static class NotReactiveWebApplicationCondition extends NoneNestedConditions {

        NotReactiveWebApplicationCondition() {
            super(ConfigurationPhase.PARSE_CONFIGURATION);
        }

        @ConditionalOnWebApplication(type = Type.REACTIVE)
        private static class ReactiveWebApplication {

        }
    }

Is there any way to configure it correctly? Thanks a log.

Comment From: spencergibb

There already is an open issue in spring cloud https://github.com/spring-cloud/spring-cloud-openfeign/issues/235

Comment From: philwebb

Thanks @spencergibb, I'm going to close this one in favor of the Spring Cloud issue.