set @RequestMapping value to return spring controller -
i have problem mapping in spring 3 mvc. general must "send" value (@requestmapping(value = "/*") return statement. how resolve? thinking this:
@requestmapping(value = "/*", method = requestmethod.get) public string homeform( model model, httpservletresponse response) throws ioexception { logger.info("welcome "); string url=response.getwriter().tostring(); return url; }
is solutions, maybe has advices? thaks
if want return string comes after slash, this:
@requestmapping(value = "/{foo}", method = requestmethod.get) public @responsebody string homeform(@pathvariable("foo") string foo) { return foo; }
Comments
Post a Comment