Skip to content

mvc: add a new name method on @XXXParam annotation #3762

@jknack

Description

@jknack

The existing value() on @Param annotation (like @QueryParam) is used for custom/unsupported parameter names.

public String hello(@QueryParam String firstname) {

}

Bc we always use the method parameter name: firstname the value is useless. Except, the parameter name doesn't follow Java naming convention, like:

public String hello(@QueryParam("first-name") String firstname) {

}

For such use cases, final users will be force to use a the new property name.

public String hello(@QueryParam(name = "first-name") String firstname) {

}

Will be keep the value annotation to defined default parameter values as defined in #3761

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions