Formatted the code
This commit is contained in:
parent
991b9629a0
commit
7868a1ec84
|
@ -6,12 +6,10 @@ import org.springframework.web.servlet.ModelAndView;
|
|||
|
||||
@Controller
|
||||
public class RequestMappingHandlerAdapterExampleController {
|
||||
@RequestMapping("/requestName")
|
||||
public ModelAndView getEmployeeName() {
|
||||
ModelAndView model = new ModelAndView("Greeting");
|
||||
|
||||
model.addObject("message", "Madhwal");
|
||||
|
||||
return model;
|
||||
}
|
||||
@RequestMapping("/requestName")
|
||||
public ModelAndView getEmployeeName() {
|
||||
ModelAndView model = new ModelAndView("Greeting");
|
||||
model.addObject("message", "Madhwal");
|
||||
return model;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,15 +7,13 @@ import org.springframework.web.servlet.ModelAndView;
|
|||
import org.springframework.web.servlet.mvc.AbstractController;
|
||||
|
||||
public class SimpleControllerHandlerAdapterExampleController extends
|
||||
AbstractController {
|
||||
AbstractController {
|
||||
|
||||
@Override
|
||||
protected ModelAndView handleRequestInternal(HttpServletRequest arg0,
|
||||
HttpServletResponse arg1) throws Exception {
|
||||
ModelAndView model = new ModelAndView("Greeting");
|
||||
|
||||
model.addObject("message", "Dinesh Madhwal");
|
||||
|
||||
return model;
|
||||
}
|
||||
@Override
|
||||
protected ModelAndView handleRequestInternal(HttpServletRequest arg0,
|
||||
HttpServletResponse arg1) throws Exception {
|
||||
ModelAndView model = new ModelAndView("Greeting");
|
||||
model.addObject("message", "Dinesh Madhwal");
|
||||
return model;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue