From 6a0c613307546d0fdf8aba50ff39817944ea9c65 Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Wed, 14 Jun 2023 15:21:59 +0200 Subject: chore(core): some small code maintenance --- .../main/java/at/gv/egiz/pdfas/web/filter/UserAgentFilter.java | 9 +++------ .../java/at/gv/egiz/pdfas/web/servlets/SoapServiceServlet.java | 8 -------- pdf-as-web/src/main/resources/META-INF/context.xml | 3 +++ 3 files changed, 6 insertions(+), 14 deletions(-) create mode 100644 pdf-as-web/src/main/resources/META-INF/context.xml diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/filter/UserAgentFilter.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/filter/UserAgentFilter.java index 504cf472..ef7d391d 100644 --- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/filter/UserAgentFilter.java +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/filter/UserAgentFilter.java @@ -10,14 +10,11 @@ import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import lombok.extern.slf4j.Slf4j; +@Slf4j public class UserAgentFilter implements Filter { - private static final Logger logger = LoggerFactory - .getLogger(UserAgentFilter.class); - @Override public void init(FilterConfig filterConfig) throws ServletException { // TODO Auto-generated method stub @@ -37,7 +34,7 @@ public class UserAgentFilter implements Filter { public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if(request instanceof HttpServletRequest) { - logger.debug("Processing Parameters into Attributes"); + log.debug("Processing Parameters into Attributes"); HttpServletRequest httpRequest = (HttpServletRequest)request; requestUserAgent.set(httpRequest.getHeader("User-Agent")); } diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/SoapServiceServlet.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/SoapServiceServlet.java index 71395304..ca005abe 100644 --- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/SoapServiceServlet.java +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/SoapServiceServlet.java @@ -5,20 +5,12 @@ import javax.xml.ws.Endpoint; import org.apache.cxf.Bus; import org.apache.cxf.BusFactory; -import org.apache.cxf.feature.LoggingFeature; -import org.apache.cxf.interceptor.LoggingInInterceptor; -import org.apache.cxf.interceptor.LoggingOutInterceptor; import org.apache.cxf.transport.servlet.CXFNonSpringServlet; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import at.gv.egiz.pdfas.web.ws.PDFASSigningImpl; import at.gv.egiz.pdfas.web.ws.PDFASVerificationImpl; public class SoapServiceServlet extends CXFNonSpringServlet { - - private static final Logger logger = LoggerFactory - .getLogger(SoapServiceServlet.class); /** * diff --git a/pdf-as-web/src/main/resources/META-INF/context.xml b/pdf-as-web/src/main/resources/META-INF/context.xml new file mode 100644 index 00000000..716b2233 --- /dev/null +++ b/pdf-as-web/src/main/resources/META-INF/context.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file -- cgit v1.2.3