Использование spring-boot-starter-webflux и spring-boot-starter-интеграции в приложении Spring Boot 2.0.8.RELEASE, две ConversionService
s будут зарегистрированы , webFluxConversionService
и integrationConversionService
Приложение Spring не запускается и ожидает один из этих компонентов.
@Component
@RequiredArgsConstructor
public class SomeServiceAdapterImpl {
@Qualifier("webFluxConversionService")
private final ConversionService conversionService;
// SOME METHOD
}
Error messages
APPLICATION FAILED TO START
***************************
Description:
Parameter 1 of constructor in
de.test.service.SomeServiceAdapterImpl required a single bean,
but 2 were found:
- webFluxConversionService: defined by method 'webFluxConversionService' in org.springframework.web.reactive.config.DelegatingWebFluxConfiguration
- integrationConversionService: defined in null
Action:
Consider marking one of the beans as @Primary, updating the consumer to accept multiple beans, or using @Qualifier to identify the bean that should be consumed