SpringCloudCommandRouter should have the ability to configure the contextRoot from Metadata
See original GitHub issueAs far as I can see, there is right now no possibility to change the path for the RemoteServiceUri of an ServiceInstance in SpringCloudCommandRouter.
What I would like to do is something like:
private Member buildRemoteMember(ServiceInstance remoteServiceInstance) {
URI remoteServiceUri = UriComponentsBuilder.fromUri(remoteServiceInstance.getUri())
.path("/serviceprozesse-zaehlwerk-api")
.build().toUri();
return new SimpleMember<>(buildSimpleMemberName(remoteServiceInstance.getServiceId(), remoteServiceUri),
remoteServiceUri,
SimpleMember.REMOTE_MEMBER,
this::suspect);
}
The path in the above example is hardcoded to illustrate what I would like to do. It could be made configurable by using the ServiceInstance Metadata. I could provide a PR for this - if you like.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
How to change context root of a dynamic web project in Eclipse?
To do so, I changed the context root from the project "Properties | Web Project Settings | Context Root". However, the web app...
Read more >Chapter 6. Setting the context root of a web application
Setting the context root of a web application. The context root of a web application determines which URLs Tomcat will delegate to your...
Read more >Steps to configure multiple context in Shib SP - Wiki@UCSF
Purpose. The purpose of this document is to outline steps to protect multiple application context under same physical Shibboleth SP.
Read more >Change context root of a webapp doesn't work on server - Bugs
You need to log in before you can comment on or make changes to this bug. ... ( Right click on project Properties...
Read more >JSF - Issue with application url and context root configuration
We have developed a JSF application for one of our client. It was working fine both locally and in their test server.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
With ‘this’ I ment the consul implementation of Spring Cloud. I would not update the metadata. I think you are right that this is read-only. With my PR you would be able to specifiy which field from the metadata is containing the “context-root” information. That will be used to configure the URI to your e.g. ‘message-routing-information’ endpoint.
But maybe that will be more clear, if I provide a pull request for that. It will be coming soon 😉
Closing this issue as it has been resolved in the Spring Cloud Extension repository, PR #4.