summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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
-rw-r--r--src/test/java/org/onap/aai/AAIGremlinQueryTest.java2
-rw-r--r--src/test/java/org/onap/aai/GraphAdminTestConfiguration.java2
10 files changed, 19 insertions, 18 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
diff --git a/src/test/java/org/onap/aai/AAIGremlinQueryTest.java b/src/test/java/org/onap/aai/AAIGremlinQueryTest.java
index 3115b87..55506a9 100644
--- a/src/test/java/org/onap/aai/AAIGremlinQueryTest.java
+++ b/src/test/java/org/onap/aai/AAIGremlinQueryTest.java
@@ -28,7 +28,7 @@ import org.onap.aai.dbmap.AAIGraph;
import org.onap.aai.exceptions.AAIException;
import org.onap.aai.util.AAIConfig;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.context.embedded.LocalServerPort;
+import org.springframework.boot.web.server.LocalServerPort;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Import;
import org.springframework.http.*;
diff --git a/src/test/java/org/onap/aai/GraphAdminTestConfiguration.java b/src/test/java/org/onap/aai/GraphAdminTestConfiguration.java
index 3c68006..c53a0d4 100644
--- a/src/test/java/org/onap/aai/GraphAdminTestConfiguration.java
+++ b/src/test/java/org/onap/aai/GraphAdminTestConfiguration.java
@@ -81,7 +81,7 @@ public class GraphAdminTestConfiguration {
.build();
RestTemplate restTemplate = builder
- .requestFactory(new HttpComponentsClientHttpRequestFactory(client))
+ .requestFactory(() -> new HttpComponentsClientHttpRequestFactory(client))
.build();
restTemplate.setErrorHandler(new ResponseErrorHandler() {