How to selectively disable Eureka discovery client with Spring?

前端 未结 6 1400
一整个雨季
一整个雨季 2020-12-09 03:12

Is there a way to disable spring-boot eureka client registration based on the spring profile?

Currently I use the following annotations:

@Configurati         


        
6条回答
  •  有刺的猬
    2020-12-09 04:05

    There is a standard boolean spring-cloud property

    spring.cloud.discovery.enabled

    This might be better than "eureka" specific since you might be using a different provider.

提交回复
热议问题