question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SpringCloudCommandRouter should have the ability to configure the contextRoot from Metadata

See original GitHub issue

As 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:closed
  • Created 4 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
dhermannscommented, Apr 5, 2019

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 😉

0reactions
smcvbcommented, May 6, 2019

Closing this issue as it has been resolved in the Spring Cloud Extension repository, PR #4.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found