Closed hohwille closed 2 years ago
Analysis:
"/"
. In that case "/"
is appended as contextPath
followed by another static /
. The /services
is appended ending in the tripple slashes.First of all we should fix the kind of bug in ServiceDiscovererImplConfig
creating this strange URL.
Next we should consider an improvement to also normalize the URL in general in our service client to prevent such problems even in case of missconfiguration (e.g. @Path
annotations ending with /
on class level and starting with /
on method level or also similar errors in application.properties
). In the end we want to have a good user-experience and help developers invoking services flawlessly.
Expected behavior
As a devon4j user, I want to be able to use ServiceClientFactory seamlessly so that I can invoke REST services easily.
Actual behavior
When I use
devon4j-starter-http-client-rest-sync
my backend rejects the request with the error message:The reason is that the URL constructed automatically by
devon4j-http-client-rest-sync
containslocalhost:«port»///services/rest/...
. The part after host and port with the tripple slashes does not seem to come from my user-code of the REST client invocation nor from my configuration inapplication.properties
. It seems to be a bug inside the devon4j code constructing the URL.Steps to reproduce (bug) / Use Case of feature request (enhancement)
devon java create com.example.demo
)devon4j-starter-http-client-rest-sync
fromcore/pom.xml
ServiceClientFactory
that is extendingRestServiceTest
.Related/Dependent Issues
Comments/Hints:
Affected version: