BAEL-86:
- Changed component scanning.
This commit is contained in:
parent
da0f93feb5
commit
6f2c2a7d1d
@ -19,9 +19,9 @@ public class WebApplicationInitializer implements org.springframework.web.WebApp
|
|||||||
AnnotationConfigWebApplicationContext webContext =
|
AnnotationConfigWebApplicationContext webContext =
|
||||||
new AnnotationConfigWebApplicationContext();
|
new AnnotationConfigWebApplicationContext();
|
||||||
webContext.register(WebConfiguration.class);
|
webContext.register(WebConfiguration.class);
|
||||||
webContext.scan("com.baeldung.spring.dispatcher.servlet.web");
|
DispatcherServlet dispatcherServlet = new DispatcherServlet(webContext);
|
||||||
ServletRegistration.Dynamic servlet = servletContext.addServlet("dispatcher",
|
ServletRegistration.Dynamic servlet = servletContext.addServlet("dispatcher",
|
||||||
new DispatcherServlet(webContext));
|
dispatcherServlet);
|
||||||
servlet.addMapping("/*");
|
servlet.addMapping("/*");
|
||||||
MultipartConfigElement multipartConfigElement =
|
MultipartConfigElement multipartConfigElement =
|
||||||
new MultipartConfigElement("/tmp");
|
new MultipartConfigElement("/tmp");
|
||||||
|
@ -27,7 +27,7 @@ import javax.servlet.ServletContext;
|
|||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@ComponentScan("com.baeldung.enterprise.patterns.dispatcher.servlet.web")
|
@ComponentScan("com.baeldung.spring.dispatcher.servlet.web")
|
||||||
@EnableWebMvc
|
@EnableWebMvc
|
||||||
public class WebConfiguration extends WebMvcConfigurerAdapter {
|
public class WebConfiguration extends WebMvcConfigurerAdapter {
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user