From 80c15f30f394cbc940b2a9f3c3fed526593fb9f2 Mon Sep 17 00:00:00 2001 From: eugenp Date: Sat, 11 May 2013 23:59:10 +0300 Subject: [PATCH] exception work --- .../spring/web/config/ClientWebConfig.java | 35 ++++++++++--------- .../src/main/webapp/WEB-INF/mvc-servlet.xml | 5 ++- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/spring-beandefinitionstoreexception/src/main/java/org/baeldung/spring/web/config/ClientWebConfig.java b/spring-beandefinitionstoreexception/src/main/java/org/baeldung/spring/web/config/ClientWebConfig.java index 2758a707e6..ba82fef101 100644 --- a/spring-beandefinitionstoreexception/src/main/java/org/baeldung/spring/web/config/ClientWebConfig.java +++ b/spring-beandefinitionstoreexception/src/main/java/org/baeldung/spring/web/config/ClientWebConfig.java @@ -11,29 +11,30 @@ import org.springframework.web.servlet.view.JstlView; @EnableWebMvc @Configuration +// @ImportResource("beans.xml") 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-beandefinitionstoreexception/src/main/webapp/WEB-INF/mvc-servlet.xml b/spring-beandefinitionstoreexception/src/main/webapp/WEB-INF/mvc-servlet.xml index 5463820874..0e0ded0a71 100644 --- a/spring-beandefinitionstoreexception/src/main/webapp/WEB-INF/mvc-servlet.xml +++ b/spring-beandefinitionstoreexception/src/main/webapp/WEB-INF/mvc-servlet.xml @@ -1,6 +1,5 @@ - + \ No newline at end of file