defaultValue « MVC « Spring Q&A





1. Spring MVC defaultValue for Double    stackoverflow.com

I'm trying to build a controller like this:

@RequestMapping(method = {RequestMethod.GET}, value = "/users/detail/activities.do")
public View foo(@RequestParam(value = "userCash", defaultValue="0.0") Double userCash)
{
    System.out.println("foo userCash=" + userCash);
}
This works fine: http://localhost/app/users/detail/activities.do?userCash=123& but ...

2. Spring MVC defaultValue for Double    forum.springsource.org

Spring MVC defaultValue for Double Hi All, I'm trying to build a controller like this: @RequestMapping(method = {RequestMethod.GET}, value = "/users/detail/activities.do") public View foo( @RequestParam(value = "userCash", defaultValue="0.0") Double userCash) { ...