diff --git a/spring-mvc-handlers/src/main/java/com/baeldung/spring/controller/RequestMappingHandlerAdapterExampleController.java b/spring-mvc-handlers/src/main/java/com/baeldung/spring/controller/RequestMappingHandlerAdapterExampleController.java index 012ba555dc..06c94a7746 100644 --- a/spring-mvc-handlers/src/main/java/com/baeldung/spring/controller/RequestMappingHandlerAdapterExampleController.java +++ b/spring-mvc-handlers/src/main/java/com/baeldung/spring/controller/RequestMappingHandlerAdapterExampleController.java @@ -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; + } } diff --git a/spring-mvc-handlers/src/main/java/com/baeldung/spring/controller/SimpleControllerHandlerAdapterExampleController.java b/spring-mvc-handlers/src/main/java/com/baeldung/spring/controller/SimpleControllerHandlerAdapterExampleController.java index 59d932812c..6e6e29e3d6 100644 --- a/spring-mvc-handlers/src/main/java/com/baeldung/spring/controller/SimpleControllerHandlerAdapterExampleController.java +++ b/spring-mvc-handlers/src/main/java/com/baeldung/spring/controller/SimpleControllerHandlerAdapterExampleController.java @@ -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; + } } \ No newline at end of file