Spring Cloud is registered with Eureka, The service ID is service-appuser, The service is deployed to Tomcat via War. Its War name/ID is appuser. It zuul configuration is: zuul: sensitive-headers: routes: api-appuser: path: /api-appuser/** serviceId: service-appuser

I have to use ‘http://localhost:8080/zuul/api-appuser/brain-service-appuser/dataSummary’, and add War name to the api-appuser in order to visit the service-appuser via zuul. How could I access it without adding the War name?like this:'http://localhost:8080/zuul/api-appuser/dataSummary'

Comment From: ryanjbaxter

So http://localhost:8080/zuul/api-appuser/brain-service-appuser/dataSummary works? This sounds like a Tomcat configuration issue more than something to do with Zuul.

Comment From: Racooooooon

So http://localhost:8080/zuul/api-appuser/brain-service-appuser/dataSummary works? This sounds like a Tomcat configuration issue more than something to do with Zuul.

Yes. I get it. but Is it possible to achieve this through the configuration of Eureak registration?

Comment From: Racooooooon

So http://localhost:8080/zuul/api-appuser/brain-service-appuser/dataSummary works? This sounds like a Tomcat configuration issue more than something to do with Zuul.

Yes. I get it. but Is it possible to achieve this through the configuration of Eureak registration?

Sorry,i make a mistake,the url should is http://localhost:8080/zuul/api-appuser/service-appuser/dataSummary and it works

And when i use Feign visited service 'service-appuser',i must use @FeignClient(value = "service-appuser/appuser")

Comment From: ryanjbaxter

Do you have have zuul.stripPrefix=true?

Comment From: Racooooooon

Do you have have zuul.stripPrefix=true?

No,but this property default value is true,so i add zuul.stripPrefix=flase,nothing has changed. Probably spring boot? Property server.contextPath does not work.

Comment From: spencergibb

Server context path doesn't apply when deployed as a war

Comment From: Racooooooon

Server context path doesn't apply when deployed as a war

Ok, thank you very much!

Comment From: ryanjbaxter

To be honest I am not sure what else we can do, maybe you can write a custom filter to manipulate the path to work for your use case.

Comment From: Racooooooon

To be honest I am not sure what else we can do, maybe you can write a custom filter to manipulate the path to work for your use case.

ok, thank you for your advice!I'll try

Comment From: spencergibb

Closing this due to inactivity. Please re-open if there's more to discuss.