Is there a way to disable spring-boot eureka client registration based on the spring profile?
Currently I use the following annotations:
@Configurati
Do it like this: create some @Configuration annotated class (class body can be omitted) ex.:
@Profile("!development")
@Configuration
@EnableDiscoveryClient
public class EurekaClientConfiguration {
}
It means that this configuration file (and @EnableDiscoveryClient within) will be loaded in every profile except "developement".
Hope that helps,