#BAEL-2862: remove Spring related class
This commit is contained in:
parent
32763ab63d
commit
c22c1a9cab
|
@ -1,27 +0,0 @@
|
|||
package com.baeldung.web.log.config;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRegistration;
|
||||
|
||||
import org.springframework.web.context.ContextLoaderListener;
|
||||
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
|
||||
import org.springframework.web.servlet.DispatcherServlet;
|
||||
import org.springframework.web.WebApplicationInitializer;
|
||||
|
||||
public class CustomWebAppInitializer implements WebApplicationInitializer {
|
||||
|
||||
@Override
|
||||
public void onStartup(ServletContext container) throws ServletException {
|
||||
|
||||
AnnotationConfigWebApplicationContext context = new AnnotationConfigWebApplicationContext();
|
||||
context.setConfigLocation("com.baeldung.web.log");
|
||||
container.addListener(new ContextLoaderListener(context));
|
||||
|
||||
ServletRegistration.Dynamic dispatcher = container.addServlet("dispatcher", new DispatcherServlet(context));
|
||||
dispatcher.setLoadOnStartup(1);
|
||||
dispatcher.addMapping("/");
|
||||
|
||||
container.addFilter("customRequestLoggingFilter", CustomeRequestLoggingFilter.class).addMappingForServletNames(null, false, "dispatcher");
|
||||
}
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
package com.baeldung.web.log.config;
|
||||
|
||||
import org.springframework.web.filter.CommonsRequestLoggingFilter;
|
||||
|
||||
public class CustomeRequestLoggingFilter extends CommonsRequestLoggingFilter {
|
||||
|
||||
public CustomeRequestLoggingFilter() {
|
||||
super.setIncludeQueryString(true);
|
||||
super.setIncludePayload(true);
|
||||
super.setMaxPayloadLength(10000);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue