aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorIgor Dysko <igor1.dysko@orange.com>2020-07-22 14:29:21 +0200
committerIgor Dysko <igor1.dysko@orange.com>2020-07-22 14:29:21 +0200
commit48b99fe5add8e59789b74d49eca6732813d2ae97 (patch)
tree0fc8784f6b6166183cb2aecd393a2eeeeaf0281f /src/main
parentde4fc52226078ed9276323416c3b5129e6780973 (diff)
Update to spring boot 2
Update of code and dependencies Issue-ID: AAI-2530 Signed-off-by: Igor Dysko <igor1.dysko@orange.com> Change-Id: Iff78a028c237586a285c410a7522744f8a488b58
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/onap/aai/migration/v12/UriMigration.java3
-rw-r--r--src/main/java/org/onap/aai/migration/v14/MigrateSameSourcedRCTROPserverData.java3
-rw-r--r--src/main/java/org/onap/aai/migration/v14/PserverDedupWithDifferentSourcesOfTruth.java3
-rw-r--r--src/main/java/org/onap/aai/schema/GenTester.java2
-rw-r--r--src/main/java/org/onap/aai/schema/GenTester4Hist.java2
-rw-r--r--src/main/java/org/onap/aai/web/JerseyConfiguration.java7
-rw-r--r--src/main/java/org/onap/aai/web/LocalHostAccessLog.java10
-rw-r--r--src/main/resources/application.properties3
8 files changed, 17 insertions, 16 deletions
diff --git a/src/main/java/org/onap/aai/migration/v12/UriMigration.java b/src/main/java/org/onap/aai/migration/v12/UriMigration.java
index cc8ba55..ed3b84d 100644
--- a/src/main/java/org/onap/aai/migration/v12/UriMigration.java
+++ b/src/main/java/org/onap/aai/migration/v12/UriMigration.java
@@ -19,6 +19,7 @@
*/
package org.onap.aai.migration.v12;
+import java.nio.charset.UnsupportedCharsetException;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
import org.apache.tinkerpop.gremlin.structure.Vertex;
@@ -158,7 +159,7 @@ public class UriMigration extends Migrator {
private static String encodeProp(String s) {
try {
return UriUtils.encode(s, "UTF-8");
- } catch (UnsupportedEncodingException e) {
+ } catch (UnsupportedCharsetException e) {
return "";
}
}
diff --git a/src/main/java/org/onap/aai/migration/v14/MigrateSameSourcedRCTROPserverData.java b/src/main/java/org/onap/aai/migration/v14/MigrateSameSourcedRCTROPserverData.java
index cfc8c74..a3085c9 100644
--- a/src/main/java/org/onap/aai/migration/v14/MigrateSameSourcedRCTROPserverData.java
+++ b/src/main/java/org/onap/aai/migration/v14/MigrateSameSourcedRCTROPserverData.java
@@ -19,6 +19,7 @@
*/
package org.onap.aai.migration.v14;
+import java.nio.charset.UnsupportedCharsetException;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
import org.apache.tinkerpop.gremlin.structure.*;
@@ -568,7 +569,7 @@ public class MigrateSameSourcedRCTROPserverData extends EdgeSwingMigrator {
private static String encodeProp(String s) {
try {
return UriUtils.encode(s, "UTF-8");
- } catch (UnsupportedEncodingException e) {
+ } catch (UnsupportedCharsetException e) {
return "";
}
}
diff --git a/src/main/java/org/onap/aai/migration/v14/PserverDedupWithDifferentSourcesOfTruth.java b/src/main/java/org/onap/aai/migration/v14/PserverDedupWithDifferentSourcesOfTruth.java
index 11f7bd5..b2d964b 100644
--- a/src/main/java/org/onap/aai/migration/v14/PserverDedupWithDifferentSourcesOfTruth.java
+++ b/src/main/java/org/onap/aai/migration/v14/PserverDedupWithDifferentSourcesOfTruth.java
@@ -19,6 +19,7 @@
*/
package org.onap.aai.migration.v14;
+import java.nio.charset.UnsupportedCharsetException;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
import org.apache.tinkerpop.gremlin.process.traversal.P;
@@ -350,7 +351,7 @@ public class PserverDedupWithDifferentSourcesOfTruth extends EdgeSwingMigrator {
private static String encodeProp(String s) {
try {
return UriUtils.encode(s, "UTF-8");
- } catch (UnsupportedEncodingException e) {
+ } catch (UnsupportedCharsetException e) {
return "";
}
}
diff --git a/src/main/java/org/onap/aai/schema/GenTester.java b/src/main/java/org/onap/aai/schema/GenTester.java
index 160ec22..defe8bb 100644
--- a/src/main/java/org/onap/aai/schema/GenTester.java
+++ b/src/main/java/org/onap/aai/schema/GenTester.java
@@ -145,7 +145,7 @@ public class GenTester {
imsg = "-- Loading new schema elements into JanusGraph --";
System.out.println(imsg);
LOGGER.debug(imsg);
- SchemaGenerator.loadSchemaIntoJanusGraph(graph, graphMgt, null);
+ SchemaGenerator.loadSchemaIntoJanusGraph(graphMgt, null);
if( graph != null ){
imsg = "-- graph commit";
diff --git a/src/main/java/org/onap/aai/schema/GenTester4Hist.java b/src/main/java/org/onap/aai/schema/GenTester4Hist.java
index 05478e2..cbe82e4 100644
--- a/src/main/java/org/onap/aai/schema/GenTester4Hist.java
+++ b/src/main/java/org/onap/aai/schema/GenTester4Hist.java
@@ -147,7 +147,7 @@ public class GenTester4Hist {
imsg = "-- Loading new schema elements into JanusGraph --";
System.out.println(imsg);
LOGGER.debug(imsg);
- SchemaGenerator4Hist.loadSchemaIntoJanusGraph(graph, graphMgt, null);
+ SchemaGenerator4Hist.loadSchemaIntoJanusGraph(graphMgt, null);
if( graph != null ){
imsg = "-- graph commit";
diff --git a/src/main/java/org/onap/aai/web/JerseyConfiguration.java b/src/main/java/org/onap/aai/web/JerseyConfiguration.java
index f193b8c..a5c2cb4 100644
--- a/src/main/java/org/onap/aai/web/JerseyConfiguration.java
+++ b/src/main/java/org/onap/aai/web/JerseyConfiguration.java
@@ -19,17 +19,14 @@
*/
package org.onap.aai.web;
+import com.sun.jersey.api.client.filter.LoggingFilter;
import java.util.List;
import java.util.Set;
import java.util.logging.Logger;
import java.util.stream.Collectors;
-
import javax.annotation.Priority;
import javax.ws.rs.container.ContainerRequestFilter;
import javax.ws.rs.container.ContainerResponseFilter;
-
-import org.apache.tinkerpop.gremlin.structure.T;
-import org.glassfish.jersey.filter.LoggingFilter;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.servlet.ServletProperties;
import org.onap.aai.rest.AuditSqlDbConsumer;
@@ -68,7 +65,7 @@ public class JerseyConfiguration extends ResourceConfig {
// Following registers the request headers and response headers
// If the LoggingFilter second argument is set to true, it will print response value as well
if ("true".equalsIgnoreCase(env.getProperty("aai.request.logging.enabled"))) {
- register(new LoggingFilter(log, false));
+ register(new LoggingFilter(log, 0));
}
}
diff --git a/src/main/java/org/onap/aai/web/LocalHostAccessLog.java b/src/main/java/org/onap/aai/web/LocalHostAccessLog.java
index 4e28562..eaee501 100644
--- a/src/main/java/org/onap/aai/web/LocalHostAccessLog.java
+++ b/src/main/java/org/onap/aai/web/LocalHostAccessLog.java
@@ -24,9 +24,9 @@ import org.eclipse.jetty.server.handler.HandlerCollection;
import org.eclipse.jetty.server.handler.RequestLogHandler;
import org.eclipse.jetty.util.thread.QueuedThreadPool;
import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.context.embedded.EmbeddedServletContainerFactory;
-import org.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainerFactory;
-import org.springframework.boot.context.embedded.jetty.JettyServerCustomizer;
+import org.springframework.boot.web.embedded.jetty.JettyServerCustomizer;
+import org.springframework.boot.web.embedded.jetty.JettyServletWebServerFactory;
+import org.springframework.boot.web.servlet.server.AbstractServletWebServerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@@ -36,11 +36,11 @@ import java.util.Arrays;
public class LocalHostAccessLog {
@Bean
- public EmbeddedServletContainerFactory jettyConfigBean(
+ public AbstractServletWebServerFactory jettyConfigBean(
@Value("${jetty.threadPool.maxThreads:200}") final String maxThreads,
@Value("${jetty.threadPool.minThreads:8}") final String minThreads
){
- JettyEmbeddedServletContainerFactory jef = new JettyEmbeddedServletContainerFactory();
+ JettyServletWebServerFactory jef = new JettyServletWebServerFactory();
jef.addServerCustomizers((JettyServerCustomizer) server -> {
HandlerCollection handlers = new HandlerCollection();
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 82780f7..ba59da9 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -1,7 +1,8 @@
spring.application.name=GraphAdmin
+spring.main.allow-bean-definition-overriding=true
-server.contextPath=/
+server.servlet.context-path=/
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
spring.profiles.active=production,one-way-ssl