Skip to content

Instantly share code, notes, and snippets.

@nithril
Created February 15, 2011 19:18
Show Gist options
  • Save nithril/828045 to your computer and use it in GitHub Desktop.
Save nithril/828045 to your computer and use it in GitHub Desktop.
Spring controller
@Controller
@RequestMapping(value = "/test")
public class TestController {
@RequestMapping(method = RequestMethod.GET, value = "/1")
public ModelAndView getCreateForm() {
Map map = new HashMap();
Account account = new Account();
account.setName("John Doe");
map.put("foo", "foo value");
map.put("account", account);
return new ModelAndView("/test", map);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment