summaryrefslogtreecommitdiff
path: root/eaaf-springboot-utils
diff options
context:
space:
mode:
Diffstat (limited to 'eaaf-springboot-utils')
-rw-r--r--eaaf-springboot-utils/checks/spotbugs-exclude.xml16
-rw-r--r--eaaf-springboot-utils/pom.xml4
-rw-r--r--eaaf-springboot-utils/src/main/java/at/gv/egiz/eaaf/utils/springboot/ajp/TomcatAjpConfiguration.java2
-rw-r--r--eaaf-springboot-utils/src/main/java/at/gv/egiz/eaaf/utils/springboot/ajp/logging/MdcEnhancerFilter.java15
-rw-r--r--eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils/springboot/test/SimpleSpringBootStarterTest.java16
-rw-r--r--eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils/springboot/test/dummy/DummyController.java6
6 files changed, 36 insertions, 23 deletions
diff --git a/eaaf-springboot-utils/checks/spotbugs-exclude.xml b/eaaf-springboot-utils/checks/spotbugs-exclude.xml
index 7bb320ee..183220ef 100644
--- a/eaaf-springboot-utils/checks/spotbugs-exclude.xml
+++ b/eaaf-springboot-utils/checks/spotbugs-exclude.xml
@@ -7,5 +7,19 @@
<OR>
<Bug pattern="PATH_TRAVERSAL_IN" />
</OR>
- </Match>
+ </Match>
+ <Match>
+ <OR>
+ <Class name="at.gv.egiz.eaaf.utils.springboot.ajp.TomcatProperties" />
+ <Class name="at.gv.egiz.eaaf.utils.springboot.ajp.logging.LoggingProperties" />
+ <Class name="at.gv.egiz.eaaf.utils.springboot.ajp.logging.LoggingProperties$Mdc" />
+ <Class name="at.gv.egiz.eaaf.utils.springboot.ajp.logging.MdcEnhancerFilter" />
+ <Class name="at.gv.egiz.eaaf.utils.springboot.security.AuthorizationConfiguration" />
+ <Class name="at.gv.egiz.eaaf.utils.springboot.security.BasicAuthUser" />
+ </OR>
+ <OR>
+ <Bug pattern="EI_EXPOSE_REP" />
+ <Bug pattern="EI_EXPOSE_REP2" />
+ </OR>
+ </Match>
</FindBugsFilter>
diff --git a/eaaf-springboot-utils/pom.xml b/eaaf-springboot-utils/pom.xml
index 3f2d2f11..3c92b428 100644
--- a/eaaf-springboot-utils/pom.xml
+++ b/eaaf-springboot-utils/pom.xml
@@ -87,8 +87,8 @@
<type>test-jar</type>
</dependency>
<dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
+ <groupId>org.apache.httpcomponents.client5</groupId>
+ <artifactId>httpclient5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/eaaf-springboot-utils/src/main/java/at/gv/egiz/eaaf/utils/springboot/ajp/TomcatAjpConfiguration.java b/eaaf-springboot-utils/src/main/java/at/gv/egiz/eaaf/utils/springboot/ajp/TomcatAjpConfiguration.java
index c665edb3..62b1c795 100644
--- a/eaaf-springboot-utils/src/main/java/at/gv/egiz/eaaf/utils/springboot/ajp/TomcatAjpConfiguration.java
+++ b/eaaf-springboot-utils/src/main/java/at/gv/egiz/eaaf/utils/springboot/ajp/TomcatAjpConfiguration.java
@@ -94,7 +94,7 @@ public class TomcatAjpConfiguration {
ajp.getAdditionalAttributes().entrySet()) {
log.debug("Set Tomcat AJP property: {} with value: {}",
entry.getKey(), entry.getValue());
- ajpConnector.setAttribute(entry.getKey(), entry.getValue());
+ ajpConnector.setProperty(entry.getKey(), entry.getValue());
}
}
log.debug("AJP connector requires secret: {}",
diff --git a/eaaf-springboot-utils/src/main/java/at/gv/egiz/eaaf/utils/springboot/ajp/logging/MdcEnhancerFilter.java b/eaaf-springboot-utils/src/main/java/at/gv/egiz/eaaf/utils/springboot/ajp/logging/MdcEnhancerFilter.java
index a1f59f66..f5da0ba5 100644
--- a/eaaf-springboot-utils/src/main/java/at/gv/egiz/eaaf/utils/springboot/ajp/logging/MdcEnhancerFilter.java
+++ b/eaaf-springboot-utils/src/main/java/at/gv/egiz/eaaf/utils/springboot/ajp/logging/MdcEnhancerFilter.java
@@ -4,19 +4,18 @@ import java.io.IOException;
import java.util.HashMap;
import java.util.Optional;
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
-
import org.apache.commons.lang3.StringUtils;
import org.slf4j.MDC;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Component;
+import jakarta.servlet.Filter;
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.Cookie;
+import jakarta.servlet.http.HttpServletRequest;
import lombok.Getter;
@Component
diff --git a/eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils/springboot/test/SimpleSpringBootStarterTest.java b/eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils/springboot/test/SimpleSpringBootStarterTest.java
index e0c478af..f9aa8d6e 100644
--- a/eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils/springboot/test/SimpleSpringBootStarterTest.java
+++ b/eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils/springboot/test/SimpleSpringBootStarterTest.java
@@ -5,13 +5,13 @@ import static org.junit.Assert.assertNotNull;
import java.io.IOException;
-import org.apache.http.client.ClientProtocolException;
-import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClientBuilder;
-import org.apache.http.impl.client.HttpClients;
+import org.apache.hc.client5.http.ClientProtocolException;
+import org.apache.hc.client5.http.classic.methods.HttpGet;
+import org.apache.hc.client5.http.classic.methods.HttpUriRequest;
+import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
+import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse;
+import org.apache.hc.client5.http.impl.classic.HttpClientBuilder;
+import org.apache.hc.client5.http.impl.classic.HttpClients;
import org.junit.Assert;
import org.junit.Test;
import org.springframework.boot.ExitCodeGenerator;
@@ -61,7 +61,7 @@ public class SimpleSpringBootStarterTest {
final HttpUriRequest httpGet1 = new HttpGet("http://localhost:8080/junit");
final CloseableHttpResponse httpResp1 = client.execute(httpGet1);
- assertEquals("http statusCode", 200, httpResp1.getStatusLine().getStatusCode());
+ assertEquals("http statusCode", 200, httpResp1.getCode());
}
diff --git a/eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils/springboot/test/dummy/DummyController.java b/eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils/springboot/test/dummy/DummyController.java
index 65dcf5c1..641eebd7 100644
--- a/eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils/springboot/test/dummy/DummyController.java
+++ b/eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils/springboot/test/dummy/DummyController.java
@@ -2,13 +2,13 @@ package at.gv.egiz.eaaf.utils.springboot.test.dummy;
import java.io.IOException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+
@Controller
public class DummyController {