-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)status: duplicateA duplicate of another issueA duplicate of another issue
Description
Paul opened SPR-14021 and commented
If I have Spring MVC interface with methods, whose params are annotated with different param types like this:
public interface PersonAPIEndpoint {
@RequestMapping(
path = "/person/{username}/",
method = RequestMethod.GET
)
DeferredResult<PersonWithOrganizationalUnitsDTO> loadUserByUsername(@PathVariable("username") String username);
@RequestMapping(
path = "/person",
method = RequestMethod.GET
)
DeferredResult<DataPage<PersonDTO>> listPersons(@RequestParam("pageNum") int pageNum, @RequestParam("pageSize") int pageSize, @RequestParam(value = "query", required = false) String query);
and class, which is derived from this interface, but arguments of methods are not annotated with Param annotations mapper behaviour is inconsistent:
values, annotated with @RequestParam
get their values in implementing class, and with @PathVariable
— not.
Issue Links:
- Enable REST controller method parameter annotations on an interface [SPR-11055] #15682 Enable REST controller method parameter annotations on an interface ("duplicates")
Referenced from: commits spring-attic/spring-framework-issues@bfbb943, spring-attic/spring-framework-issues@de6f178
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)status: duplicateA duplicate of another issueA duplicate of another issue