Describe the bug
APPLICATION FAILED TO START
Description: The bean 'samplebackend.FeignClientSpecification' could not be registered. A bean with that name has already been defined and overriding is disabled. Action: Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true
Sample
@FeignClient("samplebackend")
public interface Endpoint1FeignClient extends Endpoint1 {
}
@FeignClient("samplebackend")
public interface Endpoint2FeignClient extends Endpoint2 {
}
"samplebackend" have to be equal as both endpoints are in the same microservice registered with this name in eureka-server.
Comment From: leiyazhen
i have the same situation.exceptions like this:
The bean 'remoteUserAreaService.FeignClientSpecification', defined in null, could not be registered. A bean with that name has already been defined in null and overriding is disabled.
Comment From: ryanjbaxter
See the section about context ids here https://cloud.spring.io/spring-cloud-static/spring-cloud-openfeign/2.2.1.RELEASE/reference/html/#spring-cloud-feign-overriding-defaults
Or the section about creating feign clients manually here https://cloud.spring.io/spring-cloud-static/spring-cloud-openfeign/2.2.1.RELEASE/reference/html/#creating-feign-clients-manually