简体   繁体   中英

Eureka instance appname not working with Spring Cloud Gateway

It seems like gateway can't resolve application registered in eureka server using eureka.instance.appname. In our case we have applications deployed in two different environment (uat and qa) but both will register on one clustered eureka server. We differentiate the applications from two environments using eureka.instance.appname. One is registered as service_app_uat and another one as service_app_qa however the spring.application.name is service.app. Eureka is able to register the app from two different environment just fine but Spring Cloud Gateway can't resolve these two registered instances from eureka. However if we removed the eureka.instance.appname both app from two environments registered as service_app with two instances which we don't want.

Is there any other way to register application in Eureka with custom service name?

Can't you just utilize Spring Profiles and provide different naming via spring.application.name?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM