http://codetutr.com/2013/04/09/spring-mvc-easy-rest-based-json-services-with-responsebody/
I managed to get it running in eclipse, but of course I got the page not found, 404 exception. With my recent research, however, I didn't feel quite as helpless as I usually do when faced with this. After checking out my last post, I realized what was lacking in this application was a default request mapping - i.e.
@RequestMapping({"/","/home"})
Since it came with a "home.jsp" already, I just copied a method from the STS-generated springMVC app:
public String home(Locale locale, Model model) {
return "home";
}
If there wasn't a home.jsp there already, I could have copied one into WEB-INF/views from the generated project.
Here's the page:
No comments:
Post a Comment