You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] RequestTemplate.request() concatenates url with null path — literal null segment in request URL #6855
SpringMvcContract.parseRequestTemplate constructs new RequestTemplate() (field path defaults to null) and only calls setPath when methodMapping.value().length > 0. A method such as @GetMapping String health() (valid Spring MVC, maps to the class root) leaves path == null. ShenyuClientInvocationHandler.buildMethodHandlerMap then does requestTemplate.setPath(shenyuClientFactoryBean.getPath() + requestTemplate.getPath()) — with a class-level @ShenyuClient(path="/api"), "/api" + null evaluates to "/apinull". With no class path, RequestTemplate.request() line 82 does this.url + this.path → url + null → "http://hostnull". Java string concatenation appends the literal "null".
Any @ShenyuClient method whose @RequestMapping/@GetMapping has no value (root-mapped) issues requests to a corrupted URL ending in null (e.g. http://gateway/apinull or http://gatewaynull), silently 404'ing or hitting the wrong path. This is a common, valid Spring-MVC annotation pattern.
Suggested fix
Default path to "" in RequestTemplate (or guard request(): this.url + (this.path == null ? "" : this.path)); ensure SpringMvcContract sets path to "" when no value is present.
Activity
github-actions commentedon Aug 4, 2026
👋 Hello @Aias00
A new issue has been opened by @Aias00:
Please review when you have time. Thank you! 🙏
yykaue commentedon Aug 21, 2026
/assign