-   Notifications  You must be signed in to change notification settings 
- Fork 38.8k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement
Milestone
Description
Affects: 6.1.5
A rest controller with the following method
 @GetMapping("/{path}") public void get(Params params, @PathVariable long path, @RequestParam String foo, @RequestHeader String accept) { System.out.printf("path: %d%n", path); System.out.printf("foo: %s%n", foo); System.out.printf("accept: %s%n", accept); System.out.printf("params: %s%n", params); } public record Params(@PathVariable long path, @RequestParam String foo, @RequestHeader String accept) {}will produce the following log when called with /1?foo=FOO:
 path: 1 foo: FOO accept: application/json, text/plain, */* params: Params[path=1, foo=FOO, accept=null] @PathVariable and @RequestParam are correctly used to instantiate the record but the @RequestHeader remains null (although it works as a parameter of the controller method)
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement