- Changed component scanning.
This commit is contained in:
Christian Rädel 2016-10-21 11:57:14 +02:00 committed by slavisa-baeldung
parent da0f93feb5
commit 6f2c2a7d1d
2 changed files with 3 additions and 3 deletions

View File

@ -19,9 +19,9 @@ public class WebApplicationInitializer implements org.springframework.web.WebApp
AnnotationConfigWebApplicationContext webContext =
new AnnotationConfigWebApplicationContext();
webContext.register(WebConfiguration.class);
webContext.scan("com.baeldung.spring.dispatcher.servlet.web");
DispatcherServlet dispatcherServlet = new DispatcherServlet(webContext);
ServletRegistration.Dynamic servlet = servletContext.addServlet("dispatcher",
new DispatcherServlet(webContext));
dispatcherServlet);
servlet.addMapping("/*");
MultipartConfigElement multipartConfigElement =
new MultipartConfigElement("/tmp");

View File

@ -27,7 +27,7 @@ import javax.servlet.ServletContext;
import java.util.Locale;
@Configuration
@ComponentScan("com.baeldung.enterprise.patterns.dispatcher.servlet.web")
@ComponentScan("com.baeldung.spring.dispatcher.servlet.web")
@EnableWebMvc
public class WebConfiguration extends WebMvcConfigurerAdapter {
@Override