diff --git a/spring-mvc-no-xml/src/main/java/org/baeldung/spring/web/config/ClientWebConfig.java b/spring-mvc-no-xml/src/main/java/org/baeldung/spring/web/config/ClientWebConfig.java index 2758a707e6..945c1794fb 100644 --- a/spring-mvc-no-xml/src/main/java/org/baeldung/spring/web/config/ClientWebConfig.java +++ b/spring-mvc-no-xml/src/main/java/org/baeldung/spring/web/config/ClientWebConfig.java @@ -13,27 +13,27 @@ import org.springframework.web.servlet.view.JstlView; @Configuration public class ClientWebConfig extends WebMvcConfigurerAdapter { - public ClientWebConfig() { - super(); - } + public ClientWebConfig() { + super(); + } - // API + // API - @Override - public void addViewControllers(final ViewControllerRegistry registry) { - super.addViewControllers(registry); + @Override + public void addViewControllers(final ViewControllerRegistry registry) { + super.addViewControllers(registry); - registry.addViewController("/sample.html"); - } + registry.addViewController("/sample.html"); + } - @Bean - public ViewResolver viewResolver() { - final InternalResourceViewResolver bean = new InternalResourceViewResolver(); + @Bean + public ViewResolver viewResolver() { + final InternalResourceViewResolver bean = new InternalResourceViewResolver(); - bean.setViewClass(JstlView.class); - bean.setPrefix("/WEB-INF/view/"); - bean.setSuffix(".jsp"); + bean.setViewClass(JstlView.class); + bean.setPrefix("/WEB-INF/view/"); + bean.setSuffix(".jsp"); - return bean; - } + return bean; + } } \ No newline at end of file diff --git a/spring-mvc-xml/src/main/java/org/baeldung/spring/web/config/ClientWebConfig.java b/spring-mvc-xml/src/main/java/org/baeldung/spring/web/config/ClientWebConfig.java index 2758a707e6..945c1794fb 100644 --- a/spring-mvc-xml/src/main/java/org/baeldung/spring/web/config/ClientWebConfig.java +++ b/spring-mvc-xml/src/main/java/org/baeldung/spring/web/config/ClientWebConfig.java @@ -13,27 +13,27 @@ import org.springframework.web.servlet.view.JstlView; @Configuration public class ClientWebConfig extends WebMvcConfigurerAdapter { - public ClientWebConfig() { - super(); - } + public ClientWebConfig() { + super(); + } - // API + // API - @Override - public void addViewControllers(final ViewControllerRegistry registry) { - super.addViewControllers(registry); + @Override + public void addViewControllers(final ViewControllerRegistry registry) { + super.addViewControllers(registry); - registry.addViewController("/sample.html"); - } + registry.addViewController("/sample.html"); + } - @Bean - public ViewResolver viewResolver() { - final InternalResourceViewResolver bean = new InternalResourceViewResolver(); + @Bean + public ViewResolver viewResolver() { + final InternalResourceViewResolver bean = new InternalResourceViewResolver(); - bean.setViewClass(JstlView.class); - bean.setPrefix("/WEB-INF/view/"); - bean.setSuffix(".jsp"); + bean.setViewClass(JstlView.class); + bean.setPrefix("/WEB-INF/view/"); + bean.setSuffix(".jsp"); - return bean; - } + return bean; + } } \ No newline at end of file