Bug Report Checklist
Description
If different Feign clients are generated, then multiple ClientConfigurations will be created with the same beans. This means that the clients cannot be initialized.
In my opinion, the @Configuration should be removed and the configuration should be specified in @EnableFeignClient or is currently also directly in the FeignClient. So it works without @Configuration.
The bigger issue is the ClientPropertiesConfiguration which loads, the properties. Maybe there should be a flag if the ClientPropertiesConfiguration should be generated or not. And also can be imported with @import from spring
https://www.baeldung.com/spring-import-annotation
Caused by: org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'clientConfiguration' for bean class [test.client2.config.ClientConfiguration] conflicts with existing, non-compatible bean definition of same name and class [test.client1.config.ClientConfiguration]
openapi-generator version
7.3.0
Steps to reproduce
See example here:
https://github.com/MelleD/open-api-feign-client-example
Bug Report Checklist
Description
If different Feign clients are generated, then multiple ClientConfigurations will be created with the same beans. This means that the clients cannot be initialized.
In my opinion, the
@Configurationshould be removed and the configuration should be specified in @EnableFeignClient or is currently also directly in theFeignClient. So it works without@Configuration.The bigger issue is the ClientPropertiesConfiguration which loads, the properties. Maybe there should be a flag if the ClientPropertiesConfiguration should be generated or not. And also can be imported with @import from spring
https://www.baeldung.com/spring-import-annotation
Caused by: org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'clientConfiguration' for bean class [test.client2.config.ClientConfiguration] conflicts with existing, non-compatible bean definition of same name and class [test.client1.config.ClientConfiguration]openapi-generator version
7.3.0
Steps to reproduce
See example here:
https://github.com/MelleD/open-api-feign-client-example