Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default value for @RequestParam [SPR-5237] #9911

Closed
spring-projects-issues opened this issue Oct 23, 2008 · 1 comment
Closed

Default value for @RequestParam [SPR-5237] #9911

spring-projects-issues opened this issue Oct 23, 2008 · 1 comment
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Oct 23, 2008

Kenny MacLeod opened SPR-5237 and commented

From #8915:

Kenny MacLeod added a comment - 13/Dec/07 12:05 PM
Alternatively, perhaps @RequestParam could take an optional "defaultValue" attribute? It'd have to be a string, subject to the same conversion rules as if the parameter had been present. This would work for primitives as well as reference types.

Connor Barry added a comment - 24/Oct/08 01:36 AM
I agree, a defaultValue attribute would be really helpful here, to mimic the set of functions in ServletRequestUtils that allow a default to be set if it's not present, for example:
ServletRequestUtils.getBooleanParameter(request, name, defaultVal)


Affects: 2.5 final

Issue Links:

Referenced from: commits 0012c1e

@spring-projects-issues
Copy link
Collaborator Author

Arjen Poutsma commented

Done: defaultValue in @RequestParam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants