First controller added

This commit is contained in:
jmodi 2016-03-08 23:26:05 +05:30
parent c0ffd1e4bf
commit f5228b6935
1 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,17 @@
package com.baeldung.spring;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;
public class HelloController extends AbstractController {
@Override
protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {
ModelAndView model = new ModelAndView("helloworld");
model.addObject("msg", "!! Welcome to baeldung's Spring Handler Mappings Guide. <br> This is using SimpleUrlHandlerMapping.");
return model;
}
}