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?