ReactiveFeignNamedContextFactory could not be found ReactiveFeignClient

1.1k Views Asked by At

Hi I'm implementing a spring boot application with spring version 3.0.2 and using feign-reactor-webclient:3.2.6 for API client. Every time I start application it shown error:

Parameter 0 of constructor in com.example.testfeignreactive.TestServiceClient required a bean of type 'reactivefeign.spring.config.ReactiveFeignNamedContextFactory' that could not be found.

Here is my main class

@SpringBootApplication 
@EnableReactiveFeignClients
@EnableAutoConfiguration 
class TestFeignReactiveApplication
    
    fun main(args: Array<String>) { runApplication<TestFeignReactiveApplication>(*args) }

And here is configuration

@Configuration
class CustomerClientConfig {

    @Bean
    fun reactiveOptions(): ReactiveOptions? {
        return WebReactiveOptions.Builder()
            .setReadTimeoutMillis(2000)
            .setWriteTimeoutMillis(2000)
            .setResponseTimeoutMillis(2000)
            .build()
    }

    @Bean
    fun loggerListener(): ReactiveLoggerListener<*>? {
        return DefaultReactiveLogger(Clock.systemUTC(), LoggerFactory.getLogger(TestServiceClient::class.java))
    }
}

Here is the client interface

@ReactiveFeignClient(
    name = "test-service",
    url = "http://localhost:8080",
    configuration = [CustomerClientConfig::class]
)
interface TestServiceClient {
    @RequestMapping(method = [RequestMethod.GET], value = ["/api/v1/terms-and-conditions"])
    fun getTermAndCondition(): Mono<String>
}

Is there any solution for this?

1

There are 1 best solutions below

0
On

19/04/2022: Feign Reactive does not currently have support for Spring Boot 3. See the issues on github