Update spring-boot to 2.3 13/136913/1
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Tue, 2 Jan 2024 12:45:03 +0000 (13:45 +0100)
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Tue, 2 Jan 2024 12:45:03 +0000 (13:45 +0100)
- update spring-boot to 2.3.12.RELEASE
- replace deprecated properties

Issue-ID: AAI-3680
Change-Id: Icd983c020fd62f7073f8ae61d3d4745db48dc660
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
aai-traversal/pom.xml
aai-traversal/src/main/java/org/onap/aai/web/JerseyConfiguration.java
aai-traversal/src/main/resources/application.properties
aai-traversal/src/test/java/org/onap/aai/TraversalTestConfiguration.java
aai-traversal/src/test/resources/application-onap-test.properties
aai-traversal/src/test/resources/application-test.properties

index fc3b913..a09d14f 100644 (file)
@@ -96,8 +96,8 @@
                <schema.uri.base.path>/aai</schema.uri.base.path>
                
                <!-- versions -->
-               <spring.boot.version>2.2.0.RELEASE</spring.boot.version>
-               <spring.version>5.2.0.RELEASE</spring.version>
+               <spring.boot.version>2.3.12.RELEASE</spring.boot.version>
+               <spring.version>5.2.15.RELEASE</spring.version>
                <spring.test.version>${spring.version}</spring.test.version>
                <spring.jms.version>${spring.version}</spring.jms.version>
                <keycloak.version>11.0.2</keycloak.version>
index 0bfbd9d..e430e77 100644 (file)
@@ -43,6 +43,7 @@ import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Profile;
 import org.springframework.core.env.Environment;
+import org.springframework.core.env.Profiles;
 
 @Configuration
 public class JerseyConfiguration {
@@ -115,7 +116,7 @@ public class JerseyConfiguration {
 
     private boolean isEnabledByActiveProfiles(AnnotatedElement annotatedElement) {
         boolean result = !annotatedElement.isAnnotationPresent(Profile.class)
-            || environment.acceptsProfiles(annotatedElement.getAnnotation(Profile.class).value());
+            || environment.acceptsProfiles(Profiles.of(annotatedElement.getAnnotation(Profile.class).value()));
         logger.debug("isEnabledByActiveProfiles: annotatedElement: " + annotatedElement.toString()
             + " result=" + result);
         return result;
index 5242148..5e49d18 100644 (file)
@@ -120,7 +120,7 @@ management.server.port=8448
 management.endpoints.enabled-by-default=true
 #To Enable Actuator Endpoint, you can override this in OOM Charts
 management.endpoints.web.exposure.include=info, health, prometheus
-management.metrics.web.server.auto-time-requests=false
+management.metrics.web.server.request.autotime.enabled=false
 management.metrics.tags.group_id=aai
 # management.metrics.tags.app_id=${info.build.artifact}
 #Enable this option only for debug purposes. For more information: https://github.com/micrometer-metrics/micrometer/issues/1584
index 8b94352..4a03c03 100644 (file)
@@ -37,6 +37,7 @@ import org.springframework.boot.test.context.TestConfiguration;
 import org.springframework.boot.web.client.RestTemplateBuilder;
 import org.springframework.context.annotation.Bean;
 import org.springframework.core.env.Environment;
+import org.springframework.core.env.Profiles;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.client.ClientHttpResponse;
 import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
@@ -61,7 +62,7 @@ public class TraversalTestConfiguration {
 
         RestTemplate restTemplate = null;
 
-        if (env.acceptsProfiles("one-way-ssl", "two-way-ssl")) {
+        if (env.acceptsProfiles(Profiles.of("one-way-ssl", "two-way-ssl"))) {
             char[] trustStorePassword =
                 env.getProperty("server.ssl.trust-store-password").toCharArray();
             char[] keyStorePassword =
@@ -71,7 +72,7 @@ public class TraversalTestConfiguration {
             String trustStore = env.getProperty("server.ssl.trust-store");
             SSLContextBuilder sslContextBuilder = SSLContextBuilder.create();
 
-            if (env.acceptsProfiles("two-way-ssl")) {
+            if (env.acceptsProfiles(Profiles.of("two-way-ssl"))) {
                 sslContextBuilder = sslContextBuilder
                     .loadKeyMaterial(loadPfx(keyStore, keyStorePassword), keyStorePassword);
             }
index be82fdb..99c43f4 100644 (file)
@@ -14,9 +14,9 @@ spring.jersey.application-path=${schema.uri.base.path}
 
 spring.profiles.active=production,two-way-ssl
 #The max number of active threads in this pool
-server.tomcat.max-threads=200
+server.tomcat.threads.max=200
 #The minimum number of threads always kept alive
-server.tomcat.min-Spare-Threads=25
+server.tomcat.threads.min-spare=25
 #The number of milliseconds before an idle thread shutsdown, unless the number of active threads are less or equal to minSpareThreads
 server.tomcat.max-idle-time=60000
 
index b5e5398..d77532d 100644 (file)
@@ -19,9 +19,9 @@ spring.jersey.application-path=/
 
 spring.profiles.active=production
 #The max number of active threads in this pool
-server.tomcat.max-threads=200
+server.tomcat.threads.max=200
 #The minimum number of threads always kept alive
-server.tomcat.min-Spare-Threads=25
+server.tomcat.threads.min-spare=25
 #The number of milliseconds before an idle thread shutsdown, unless the number of active threads are less or equal to minSpareThreads
 server.tomcat.max-idle-time=60000
 
@@ -86,5 +86,5 @@ schema.translator.list=config
 management.server.port=0
 management.endpoints.enabled-by-default=true
 management.endpoints.web.exposure.include=info, health, prometheus
-management.metrics.web.server.auto-time-requests=false
+management.metrics.web.server.request.autotime.enabled=false
 scrape.uri.metrics=true
\ No newline at end of file