diff options
author | Dan Timoney <dtimoney@att.com> | 2023-06-19 16:05:33 -0400 |
---|---|---|
committer | Dan Timoney <dtimoney@att.com> | 2023-08-10 14:48:32 -0400 |
commit | 6a7f13fa7e284cbec5b0743c10fdd33286aaf2ec (patch) | |
tree | 42fa7649ca8f912af8d47f35bad4b284369fae9d /ms | |
parent | a76d3f0de616b542baea9360e80a921f5f028a78 (diff) |
Port to java 17
Update to java 17 / springboot 3 to align with OpenDaylight Argon.
Copied and ported CADI library from AAF
Issue-ID: CCSDK-3917
Signed-off-by: Dan Timoney <dtimoney@att.com>
Change-Id: Idecb0cf43c48ccbbc0c61bf4278b87a37f92a56e
Diffstat (limited to 'ms')
32 files changed, 335 insertions, 174 deletions
diff --git a/ms/neng/pom.xml b/ms/neng/pom.xml index 7b3d3f02..36bb45c2 100644 --- a/ms/neng/pom.xml +++ b/ms/neng/pom.xml @@ -43,14 +43,14 @@ <swagger.directory>${basedir}/target/classes/META-INF/resources/swagger</swagger.directory> <icd.file>service.json</icd.file> <icd.package>org.onap.ccsdk.apps.ms.neng.service.rs</icd.package> - <java.version>17</java.version> + <java.version>11</java.version> <docker.registry>nexus3.onap.org:10001</docker.registry> <build.number>local</build.number> <kube.namespace>TBD</kube.namespace> <service.account>TBD</service.account> <namespace>org.onap.ccsdk.apps.ms.neng</namespace> - <maven.compiler.source>17</maven.compiler.source> - <maven.compiler.target>17</maven.compiler.target> + <maven.compiler.source>11</maven.compiler.source> + <maven.compiler.target>11</maven.compiler.target> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <sdk.java.rest>6.2.0.11</sdk.java.rest> <serviceArtifactName>ms-networkelementnamegen</serviceArtifactName> @@ -106,8 +106,8 @@ <scope>compile</scope> </dependency> <dependency> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpclient</artifactId> + <groupId>org.apache.httpcomponents.client5</groupId> + <artifactId>httpclient5</artifactId> </dependency> <dependency> <groupId>javax.ws.rs</groupId> diff --git a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/WebConfiguration.java b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/WebConfiguration.java index ca918eb9..c766b167 100644 --- a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/WebConfiguration.java +++ b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/WebConfiguration.java @@ -26,7 +26,7 @@ import org.springframework.boot.web.client.RestTemplateBuilder; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; /** * Configuration for the API part of the micro-service. @@ -37,8 +37,8 @@ public class WebConfiguration { * Creates the bean for configuring swagger. */ @Bean - public WebMvcConfigurerAdapter forwardToIndex() { - return new WebMvcConfigurerAdapter() { + public WebMvcConfigurer forwardToIndex() { + return new WebMvcConfigurer() { @Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/swagger").setViewName("redirect:/swagger/index.html"); diff --git a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/service/SpringServiceImpl.java b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/service/SpringServiceImpl.java index 3772fd71..14ed9bea 100644 --- a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/service/SpringServiceImpl.java +++ b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/service/SpringServiceImpl.java @@ -30,7 +30,7 @@ import java.util.List; import java.util.Map; import java.util.logging.Logger; import java.util.regex.Pattern; -import javax.transaction.Transactional; +import jakarta.transaction.Transactional; import org.onap.ccsdk.apps.ms.neng.core.exceptions.NengException; import org.onap.ccsdk.apps.ms.neng.core.gen.NameGenerator; import org.onap.ccsdk.apps.ms.neng.core.persistence.NamePersister; diff --git a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/persistence/entity/ExternalInterface.java b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/persistence/entity/ExternalInterface.java index 7a729af7..40343a35 100644 --- a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/persistence/entity/ExternalInterface.java +++ b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/persistence/entity/ExternalInterface.java @@ -22,10 +22,10 @@ package org.onap.ccsdk.apps.ms.neng.persistence.entity; import java.io.Serializable; import java.sql.Timestamp; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; /** * Entity representing the parameters and configuration of an external system/sub-system/application interface diff --git a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/persistence/entity/GeneratedName.java b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/persistence/entity/GeneratedName.java index b5a7463e..5831f424 100644 --- a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/persistence/entity/GeneratedName.java +++ b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/persistence/entity/GeneratedName.java @@ -22,12 +22,12 @@ package org.onap.ccsdk.apps.ms.neng.persistence.entity; import java.io.Serializable; import java.sql.Timestamp; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Table; /** * Represents a generated name. diff --git a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/persistence/entity/IdentifierMap.java b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/persistence/entity/IdentifierMap.java index de8bef18..113af252 100644 --- a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/persistence/entity/IdentifierMap.java +++ b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/persistence/entity/IdentifierMap.java @@ -22,10 +22,10 @@ package org.onap.ccsdk.apps.ms.neng.persistence.entity; import java.io.Serializable; import java.sql.Timestamp; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; /** * Maps identifiers (such as function names) in the policy to internal names used by this diff --git a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/persistence/entity/PolicyDetails.java b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/persistence/entity/PolicyDetails.java index 01410739..1e5df401 100644 --- a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/persistence/entity/PolicyDetails.java +++ b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/persistence/entity/PolicyDetails.java @@ -22,12 +22,12 @@ package org.onap.ccsdk.apps.ms.neng.persistence.entity; import java.io.Serializable; import java.sql.Timestamp; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Table; /** * Represents an entity representing policies stored in this micro-service (temporarily). diff --git a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/persistence/entity/ServiceParameter.java b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/persistence/entity/ServiceParameter.java index 92cfa4ff..c90d867b 100644 --- a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/persistence/entity/ServiceParameter.java +++ b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/persistence/entity/ServiceParameter.java @@ -22,10 +22,10 @@ package org.onap.ccsdk.apps.ms.neng.persistence.entity; import java.io.Serializable; import java.sql.Timestamp; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; /** * General parameters controlling this micro-service. diff --git a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/AaiServiceImpl.java b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/AaiServiceImpl.java index 41bfae47..2880f302 100644 --- a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/AaiServiceImpl.java +++ b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/AaiServiceImpl.java @@ -101,7 +101,7 @@ public class AaiServiceImpl { throw new NengException("Error while validating name with A&AI"); } } catch (HttpClientErrorException e) { - log.warning(e.getStatusCode().name() + " -- " + e.getResponseBodyAsString()); + log.warning(e.getStatusCode() + " -- " + e.getResponseBodyAsString()); if (HttpStatus.NOT_FOUND.equals(e.getStatusCode())) { return buildResponse(false); } diff --git a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/PolicyFinderServiceImpl.java b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/PolicyFinderServiceImpl.java index 6ae3c204..d855eb4d 100644 --- a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/PolicyFinderServiceImpl.java +++ b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/PolicyFinderServiceImpl.java @@ -35,10 +35,13 @@ import java.util.logging.Logger; import javax.net.ssl.HostnameVerifier; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSession; -import org.apache.http.conn.ssl.SSLConnectionSocketFactory; -import org.apache.http.conn.ssl.TrustStrategy; -import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.http.impl.client.HttpClients; + +import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; +import org.apache.hc.client5.http.impl.classic.HttpClients; +import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager; +import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManagerBuilder; +import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory; +import org.apache.hc.core5.ssl.TrustStrategy; import org.onap.ccsdk.apps.ms.neng.core.exceptions.NengException; import org.onap.ccsdk.apps.ms.neng.core.policy.PolicyFinder; import org.onap.ccsdk.apps.ms.neng.core.resource.model.GetConfigRequest; @@ -231,13 +234,17 @@ public class PolicyFinderServiceImpl implements PolicyFinder { if (restTemplate != null) { return restTemplate; } + TrustStrategy acceptingTrustStrategy = (X509Certificate[] chain, String authType) -> true; - SSLContext sslContext = org.apache.http.ssl.SSLContexts.custom() + SSLContext sslContext = org.apache.hc.core5.ssl.SSLContexts.custom() .loadTrustMaterial(null, acceptingTrustStrategy).build(); HostnameVerifier verifier = new AcceptIpAddressHostNameVerifier(disableHostVerification); SSLConnectionSocketFactory csf = new SSLConnectionSocketFactory(sslContext, verifier); - CloseableHttpClient httpClient = HttpClients.custom().setSSLSocketFactory(csf).build(); + + PoolingHttpClientConnectionManager connectionManager = PoolingHttpClientConnectionManagerBuilder.create().setSSLSocketFactory(csf).build(); + CloseableHttpClient httpClient = HttpClients.custom().setConnectionManager(connectionManager).build(); HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory(); + requestFactory.setHttpClient(httpClient); restTemplate = new RestTemplate(requestFactory); restTemplate.getInterceptors().add(getAuthInt()); diff --git a/ms/sliboot/pom.xml b/ms/sliboot/pom.xml index fe889f9c..30071cb0 100644 --- a/ms/sliboot/pom.xml +++ b/ms/sliboot/pom.xml @@ -17,12 +17,11 @@ <properties> <start-class>org.onap.ccsdk.apps.ms.sliboot.SlibootApp</start-class> - <aaf.cadi.version>2.1.21</aaf.cadi.version> <base.image.name>onap/ccsdk-alpine-j17-image</base.image.name> - <base.image.version>1.5-STAGING-latest</base.image.version> + <base.image.version>1.6-STAGING-latest</base.image.version> <image.name>onap/ccsdk-sliboot-alpine-image</image.name> <ccsdk.project.version>${project.version}</ccsdk.project.version> - <ccsdk.distribution.version>1.5.1</ccsdk.distribution.version> + <ccsdk.distribution.version>1.6.0-SNAPSHOT</ccsdk.distribution.version> <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp> <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format> <ccsdk.sliboot.jar>${project.artifactId}-${project.version}-exec.jar</ccsdk.sliboot.jar> @@ -41,16 +40,6 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> - <exclusions> - <exclusion> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-logging</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-log4j2</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> @@ -64,6 +53,12 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> + <exclusions> + <exclusion> + <groupId>org.antlr</groupId> + <artifactId>antlr4-runtime</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>io.springfox</groupId> @@ -71,72 +66,15 @@ <version>${springfox.version}</version> </dependency> <dependency> - <groupId>org.onap.aaf.authz</groupId> - <artifactId>aaf-cadi-client</artifactId> - <version>${aaf.cadi.version}</version> - </dependency> - <dependency> - <groupId>org.onap.aaf.authz</groupId> - <artifactId>aaf-cadi-core</artifactId> - <version>${aaf.cadi.version}</version> - </dependency> - <dependency> - <groupId>org.onap.aaf.authz</groupId> - <artifactId>aaf-auth-client</artifactId> - <version>${aaf.cadi.version}</version> - <scope>runtime</scope> - </dependency> - <dependency> - <groupId>org.onap.aaf.authz</groupId> - <artifactId>aaf-misc-env</artifactId> - <version>${aaf.cadi.version}</version> - <scope>runtime</scope> - <exclusions> - <exclusion> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.onap.aaf.authz</groupId> - <artifactId>aaf-misc-rosetta</artifactId> - <version>${aaf.cadi.version}</version> - <scope>runtime</scope> + <groupId>org.onap.ccsdk.apps</groupId> + <artifactId>ccsdk-apps-cadi-core</artifactId> + <version>${project.version}</version> </dependency> <!-- Needed by logging-analytics payload logging filter --> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-spring-boot-starter-jaxrs</artifactId> - <version>3.4.4</version> - </dependency> - <dependency> - <groupId>org.onap.aaf.authz</groupId> - <artifactId>aaf-cadi-client</artifactId> - <version>${aaf.cadi.version}</version> - </dependency> - <dependency> - <groupId>org.onap.aaf.authz</groupId> - <artifactId>aaf-cadi-core</artifactId> - <version>${aaf.cadi.version}</version> - </dependency> - <dependency> - <groupId>org.onap.aaf.authz</groupId> - <artifactId>aaf-auth-client</artifactId> - <version>${aaf.cadi.version}</version> - <scope>runtime</scope> - </dependency> - <dependency> - <groupId>org.onap.aaf.authz</groupId> - <artifactId>aaf-misc-env</artifactId> - <version>${aaf.cadi.version}</version> - <scope>runtime</scope> - </dependency> - <dependency> - <groupId>org.onap.aaf.authz</groupId> - <artifactId>aaf-misc-rosetta</artifactId> - <version>${aaf.cadi.version}</version> - <scope>runtime</scope> + <version>4.0.2</version> </dependency> <dependency> <groupId>${project.groupId}</groupId> @@ -195,6 +133,23 @@ <scope>test</scope> </dependency> <dependency> + <groupId>org.apache.derby</groupId> + <artifactId>derbytools</artifactId> + <scope>runtime</scope> + </dependency> + <dependency> + <groupId>org.antlr</groupId> + <artifactId>antlr4-runtime</artifactId> + <version>${antlr4.version}</version> + <scope>runtime</scope> + </dependency> + <dependency> + <groupId>org.antlr</groupId> + <artifactId>antlr4</artifactId> + <version>${antlr4.version}</version> + <scope>runtime</scope> + </dependency> + <dependency> <groupId>org.mariadb.jdbc</groupId> <artifactId>mariadb-java-client</artifactId> </dependency> @@ -212,6 +167,7 @@ <groupId>org.glassfish.jersey.inject</groupId> <artifactId>jersey-hk2</artifactId> </dependency> + </dependencies> <build> @@ -292,7 +248,7 @@ <plugin> <groupId>io.swagger</groupId> <artifactId>swagger-codegen-maven-plugin</artifactId> - <version>2.3.1</version> + <version>2.4.32</version> <executions> <execution> <phase>generate-sources</phase> @@ -312,8 +268,10 @@ <withXml>true</withXml> <templateDirectory>${project.basedir}/src/main/templates</templateDirectory> <configOptions> - <java8>true</java8> - <springBootVersion>2.2.4-RELEASE</springBootVersion> + <java11>true</java11> + <springBootVersion>3.0.3</springBootVersion> + <jakarta>true</jakarta> + <dateLibrary>java11</dateLibrary> </configOptions> </configuration> </execution> diff --git a/ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/FilterConfiguration.java b/ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/FilterConfiguration.java index 295953a4..ebacc049 100644 --- a/ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/FilterConfiguration.java +++ b/ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/FilterConfiguration.java @@ -5,7 +5,7 @@ import java.io.FileReader; import java.io.IOException; import java.util.Properties; -import org.onap.aaf.cadi.filter.CadiFilter; +import org.onap.ccsdk.apps.cadi.filter.CadiFilter; import org.onap.ccsdk.sli.core.utils.common.EnvProperties; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/SlibootApp.java b/ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/SlibootApp.java index 0fd23a9e..e393dd0c 100644 --- a/ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/SlibootApp.java +++ b/ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/SlibootApp.java @@ -35,7 +35,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement; import springfox.documentation.swagger2.annotations.EnableSwagger2;
import org.springframework.context.annotation.Bean;
-import org.onap.aaf.cadi.filter.CadiFilter;
+import org.onap.ccsdk.apps.cadi.filter.CadiFilter;
@SpringBootApplication(scanBasePackages={ "org.onap.ccsdk.apps.ms.sliboot.*", "org.onap.ccsdk.apps.services" })
@EnableJpaRepositories("org.onap.ccsdk.apps.ms.sliboot.*")
diff --git a/ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/controllers/RestconfApiController.java b/ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/controllers/RestconfApiController.java index 44981845..2383fe69 100644 --- a/ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/controllers/RestconfApiController.java +++ b/ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/controllers/RestconfApiController.java @@ -47,8 +47,8 @@ import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RestController; -import javax.servlet.http.HttpServletRequest; -import javax.validation.Valid; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.validation.Valid; import java.util.*; @javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2020-02-20T12:50:11.207-05:00") diff --git a/ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/data/TestResultConfig.java b/ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/data/TestResultConfig.java index 1ca4fe1f..8081d6ac 100644 --- a/ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/data/TestResultConfig.java +++ b/ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/data/TestResultConfig.java @@ -1,6 +1,6 @@ package org.onap.ccsdk.apps.ms.sliboot.data; -import javax.persistence.*; +import jakarta.persistence.*; @Entity(name = "TEST_RESULT_CONFIG") @Table(name = "TEST_RESULT_CONFIG") diff --git a/ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/data/TestResultOperational.java b/ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/data/TestResultOperational.java index b9d09934..ab3aedb5 100644 --- a/ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/data/TestResultOperational.java +++ b/ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/data/TestResultOperational.java @@ -1,6 +1,6 @@ package org.onap.ccsdk.apps.ms.sliboot.data; -import javax.persistence.*; +import jakarta.persistence.*; @Entity(name="TEST_RESULT_OPERATIONAL") @Table(name="TEST_RESULT_OPERATIONAL") diff --git a/ms/sliboot/src/main/templates/api.mustache b/ms/sliboot/src/main/templates/api.mustache index c28642cf..91483eda 100644 --- a/ms/sliboot/src/main/templates/api.mustache +++ b/ms/sliboot/src/main/templates/api.mustache @@ -7,15 +7,11 @@ package {{package}}; {{#imports}}import {{import}}; {{/imports}} -{{#jdk8-no-delegate}} - import com.fasterxml.jackson.databind.ObjectMapper; -{{/jdk8-no-delegate}} +import com.fasterxml.jackson.databind.ObjectMapper; import io.swagger.annotations.*; -{{#jdk8-no-delegate}} - import org.slf4j.Logger; - import org.slf4j.LoggerFactory; - import org.springframework.http.HttpStatus; -{{/jdk8-no-delegate}} +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; {{#useBeanValidation}} import org.springframework.validation.annotation.Validated; @@ -30,33 +26,37 @@ import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.multipart.MultipartFile; import org.onap.ccsdk.apps.services.RestException; -{{#jdk8-no-delegate}} - import javax.servlet.http.HttpServletRequest; -{{/jdk8-no-delegate}} + +{{#jakarta}} +import jakarta.servlet.*; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +{{/jakarta}} +{{^jakarta}} +import javax.servlet.*; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +{{/jakarta}} {{#useBeanValidation}} - import javax.validation.Valid; - import javax.validation.constraints.*; +{{#jakarta}} +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +{{/jakarta}} +{{^jakarta}} +import javax.validation.Valid; +import javax.validation.constraints.*; +{{/jakarta}} {{/useBeanValidation}} -{{#jdk8-no-delegate}} - import java.io.IOException; -{{/jdk8-no-delegate}} +import java.io.IOException; import java.util.List; -{{#jdk8-no-delegate}} - import java.util.Optional; -{{/jdk8-no-delegate}} -{{^jdk8-no-delegate}} - {{#useOptional}} - import java.util.Optional; - {{/useOptional}} -{{/jdk8-no-delegate}} +import java.util.Optional; {{#async}} - import java.util.concurrent.{{^jdk8}}Callable{{/jdk8}}{{#jdk8}}CompletableFuture{{/jdk8}}; +import java.util.concurrent.{{^jdk8}}Callable{{/jdk8}}{{#jdk8}}CompletableFuture{{/jdk8}}; {{/async}} {{>generatedAnnotation}} @Api(value = "{{{baseName}}}", description = "the {{{baseName}}} API") {{#operations}} public interface {{classname}} { - {{#jdk8}} {{^isDelegate}} Logger log = LoggerFactory.getLogger({{classname}}.class); @@ -76,7 +76,6 @@ import java.util.List; {{#isDelegate}} {{classname}}Delegate getDelegate(); {{/isDelegate}} - {{/jdk8}} {{#operation}} @ApiOperation(value = "{{{summary}}}", nickname = "{{{operationId}}}", notes = "{{{notes}}}"{{#returnBaseType}}, response = {{{returnBaseType}}}.class{{/returnBaseType}}{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { @@ -101,7 +100,7 @@ import java.util.List; produces = { {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }, {{/hasProduces}}{{#hasConsumes}} consumes = { {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} },{{/hasConsumes}}{{/singleContentTypes}} method = RequestMethod.{{httpMethod}}) - {{#jdk8}}default {{/jdk8}}{{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{#delegate-method}}_{{/delegate-method}}{{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},{{/hasMore}}{{/allParams}}){{^jdk8}};{{/jdk8}}{{#jdk8}} throws RestException { + default {{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{#delegate-method}}_{{/delegate-method}}{{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},{{/hasMore}}{{/allParams}}) throws RestException { {{#delegate-method}} return {{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); } @@ -129,7 +128,7 @@ import java.util.List; {{#isDelegate}} return getDelegate().{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); {{/isDelegate}} - }{{/jdk8}} + } {{/operation}} } diff --git a/ms/sliboot/src/main/templates/apiOriginFilter.mustache b/ms/sliboot/src/main/templates/apiOriginFilter.mustache new file mode 100644 index 00000000..3910a6b8 --- /dev/null +++ b/ms/sliboot/src/main/templates/apiOriginFilter.mustache @@ -0,0 +1,38 @@ +package {{apiPackage}}; + +import java.io.IOException; + +{{#jakarta}} +import jakarta.servlet.*; +import jakarta.servlet.http.HttpServletResponse; +{{/jakarta}} +{{^jakarta}} +import javax.servlet.*; +import javax.servlet.http.HttpServletResponse; +{{/jakarta}} + +{{>generatedAnnotation}} +{{#jakarta}} +public class ApiOriginFilter implements jakarta.servlet.Filter { +{{/jakarta}} +{{^jakarta}} +public class ApiOriginFilter implements javax.servlet.Filter { +{{/jakarta}} + @Override + public void doFilter(ServletRequest request, ServletResponse response, + FilterChain chain) throws IOException, ServletException { + HttpServletResponse res = (HttpServletResponse) response; + res.addHeader("Access-Control-Allow-Origin", "*"); + res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT"); + res.addHeader("Access-Control-Allow-Headers", "Content-Type"); + chain.doFilter(request, response); + } + + @Override + public void destroy() { + } + + @Override + public void init(FilterConfig filterConfig) throws ServletException { + } +} diff --git a/ms/sliboot/src/main/templates/libraries/spring-boot/swagger2SpringBoot.mustache b/ms/sliboot/src/main/templates/libraries/spring-boot/swagger2SpringBoot.mustache new file mode 100644 index 00000000..5f1d0f00 --- /dev/null +++ b/ms/sliboot/src/main/templates/libraries/spring-boot/swagger2SpringBoot.mustache @@ -0,0 +1,50 @@ +package {{basePackage}}; + +import {{configPackage}}.LocalDateConverter; +import {{configPackage}}.LocalDateTimeConverter; +import org.springframework.boot.CommandLineRunner; +import org.springframework.boot.ExitCodeGenerator; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.ComponentScan; + +import org.springframework.context.annotation.Configuration; +import org.springframework.format.FormatterRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +import springfox.documentation.swagger2.annotations.EnableSwagger2; + +@SpringBootApplication +@EnableSwagger2 +@ComponentScan(basePackages = { "{{basePackage}}", "{{apiPackage}}" , "{{configPackage}}"}) +public class Swagger2SpringBoot implements CommandLineRunner { + + @Override + public void run(String... arg0) throws Exception { + if (arg0.length > 0 && arg0[0].equals("exitcode")) { + throw new ExitException(); + } + } + + public static void main(String[] args) throws Exception { + new SpringApplication(Swagger2SpringBoot.class).run(args); + } + + @Configuration + static class MyConfig implements WebMvcConfigurer { + @Override + public void addFormatters(FormatterRegistry registry) { + registry.addConverter(new LocalDateConverter("{{#datePattern}}{{datePattern}}{{/datePattern}}{{^datePattern}}yyyy-MM-dd{{/datePattern}}")); + registry.addConverter(new LocalDateTimeConverter("{{#dateTimePattern}}{{dateTimePattern}}{{/dateTimePattern}}{{^dateTimePattern}}yyyy-MM-dd'T'HH:mm:ss.SSS{{/dateTimePattern}}")); + } + } + + class ExitException extends RuntimeException implements ExitCodeGenerator { + private static final long serialVersionUID = 1L; + + @Override + public int getExitCode() { + return 10; + } + + } +} diff --git a/ms/sliboot/src/main/templates/libraries/spring-mvc/swaggerUiConfiguration.mustache b/ms/sliboot/src/main/templates/libraries/spring-mvc/swaggerUiConfiguration.mustache new file mode 100644 index 00000000..de7ccaf7 --- /dev/null +++ b/ms/sliboot/src/main/templates/libraries/spring-mvc/swaggerUiConfiguration.mustache @@ -0,0 +1,96 @@ +package {{configPackage}}; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +{{#threetenbp}} +import com.fasterxml.jackson.datatype.threetenbp.ThreeTenModule; +{{/threetenbp}} +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.PropertySource; +import org.springframework.context.annotation.Import; +import org.springframework.context.annotation.Bean; +import org.springframework.format.FormatterRegistry; +import org.springframework.http.converter.HttpMessageConverter; +import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; +import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; +import org.springframework.web.servlet.config.annotation.EnableWebMvc; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +{{#threetenbp}} +import org.threeten.bp.Instant; +import org.threeten.bp.OffsetDateTime; +import org.threeten.bp.ZonedDateTime; +{{/threetenbp}} +import springfox.documentation.swagger2.annotations.EnableSwagger2; + +import java.util.List; + +{{>generatedAnnotation}} +@Configuration +@ComponentScan(basePackages = "{{apiPackage}}") +@EnableWebMvc +@EnableSwagger2 //Loads the spring beans required by the framework +@PropertySource("classpath:swagger.properties") +@Import(SwaggerDocumentationConfig.class) +public class SwaggerUiConfiguration implements WebMvcConfigurer { + private static final String[] SERVLET_RESOURCE_LOCATIONS = { "/" }; + + private static final String[] CLASSPATH_RESOURCE_LOCATIONS = { + "classpath:/META-INF/resources/", "classpath:/resources/", + "classpath:/static/", "classpath:/public/" }; + + private static final String[] RESOURCE_LOCATIONS; + static { + RESOURCE_LOCATIONS = new String[CLASSPATH_RESOURCE_LOCATIONS.length + + SERVLET_RESOURCE_LOCATIONS.length]; + System.arraycopy(SERVLET_RESOURCE_LOCATIONS, 0, RESOURCE_LOCATIONS, 0, + SERVLET_RESOURCE_LOCATIONS.length); + System.arraycopy(CLASSPATH_RESOURCE_LOCATIONS, 0, RESOURCE_LOCATIONS, + SERVLET_RESOURCE_LOCATIONS.length, CLASSPATH_RESOURCE_LOCATIONS.length); + } + + private static final String[] STATIC_INDEX_HTML_RESOURCES; + static { + STATIC_INDEX_HTML_RESOURCES = new String[RESOURCE_LOCATIONS.length]; + for (int i = 0; i < STATIC_INDEX_HTML_RESOURCES.length; i++) { + STATIC_INDEX_HTML_RESOURCES[i] = RESOURCE_LOCATIONS[i] + "index.html"; + } + } + + @Override + public void addResourceHandlers(ResourceHandlerRegistry registry) { + if (!registry.hasMappingForPattern("/webjars/**")) { + registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/"); + } + if (!registry.hasMappingForPattern("/**")) { + registry.addResourceHandler("/**").addResourceLocations(RESOURCE_LOCATIONS); + } + } + + @Bean + public Jackson2ObjectMapperBuilder builder() { + Jackson2ObjectMapperBuilder builder = new Jackson2ObjectMapperBuilder() + .indentOutput(true) + .featuresToDisable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) + .dateFormat(new RFC3339DateFormat()); + return builder; + } + + @Override + public void configureMessageConverters(List<HttpMessageConverter<?>> converters) { + converters.add(new MappingJackson2HttpMessageConverter(objectMapper())); + super.configureMessageConverters(converters); + } + + @Override + public void addFormatters(FormatterRegistry registry) { + registry.addConverter(new LocalDateConverter("{{#datePattern}}{{datePattern}}{{/datePattern}}{{^datePattern}}yyyy-MM-dd{{/datePattern}}")); + registry.addConverter(new LocalDateTimeConverter("{{#dateTimePattern}}{{dateTimePattern}}{{/dateTimePattern}}{{^dateTimePattern}}yyyy-MM-dd'T'HH:mm:ss.SSS{{/dateTimePattern}}")); + } + + @Bean + public ObjectMapper objectMapper(){ + return builder().build(); + } +} diff --git a/ms/vlantag-api/pom.xml b/ms/vlantag-api/pom.xml index 585ed5ca..543b49aa 100644 --- a/ms/vlantag-api/pom.xml +++ b/ms/vlantag-api/pom.xml @@ -19,8 +19,8 @@ <properties> <swagger.directory>${basedir}/target/main/resources/META-INF/resources/swagger-ui/dist</swagger.directory> <swagger.annotations.version>1.5.8</swagger.annotations.version> - <java.version>17</java.version> - <springboot.version>2.0.4.RELEASE</springboot.version> + <java.version>11</java.version> + <springboot.version>3.0.3</springboot.version> <mariadb.connector.version>2.1.1</mariadb.connector.version> <docker.registry>TBD:5100</docker.registry> <serviceArtifactName>vlantagapi</serviceArtifactName> @@ -61,6 +61,16 @@ <artifactId>spring-boot-starter-security</artifactId> </dependency> + + <dependency> + <groupId>org.apache.httpcomponents</groupId> + <artifactId>httpclient</artifactId> + </dependency> + <dependency> + <groupId>javax.ws.rs</groupId> + <artifactId>javax.ws.rs-api</artifactId> + </dependency> + <dependency> <groupId>org.onap.ccsdk.sli.core</groupId> <artifactId>sli-common</artifactId> diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/ApplicationSecurityConfig.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/ApplicationSecurityConfig.java index 80c42fb2..01860fa4 100644 --- a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/ApplicationSecurityConfig.java +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/ApplicationSecurityConfig.java @@ -21,11 +21,11 @@ import java.util.List; import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
-import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetails;
@@ -33,6 +33,7 @@ import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.crypto.factory.PasswordEncoderFactories;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.provisioning.InMemoryUserDetailsManager;
+import org.springframework.security.web.SecurityFilterChain;
/**
* ApplicationSecurityConfig.java Purpose: Configures and validates
@@ -42,14 +43,14 @@ import org.springframework.security.provisioning.InMemoryUserDetailsManager; * @version 1.0
*/
@Configuration
-public class ApplicationSecurityConfig extends WebSecurityConfigurerAdapter{
+public class ApplicationSecurityConfig {
private Logger logger = LoggerFactory.getLogger(ApplicationSecurityConfig.class);
@Autowired
private Environment environment;
- @Override
- protected void configure(AuthenticationManagerBuilder auth) throws Exception {
+ @Bean
+ public InMemoryUserDetailsManager userDetailsService() {
List<UserDetails> userDetails = new ArrayList<>();
// Explicitly set bcrypt password encoder rather than using default
@@ -74,7 +75,7 @@ public class ApplicationSecurityConfig extends WebSecurityConfigurerAdapter{ }
logger.info("-------------------------------{}",userDetails);
- auth.userDetailsService(inMemoryUserDetailsManager(userDetails));
+ return new InMemoryUserDetailsManager(userDetails);
}
@@ -82,13 +83,15 @@ public class ApplicationSecurityConfig extends WebSecurityConfigurerAdapter{ return new InMemoryUserDetailsManager(userDetails);
}
- @Override
- protected void configure(HttpSecurity http) throws Exception {
- http.authorizeRequests().anyRequest().fullyAuthenticated();
- http.httpBasic().and().sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS);
+ @Bean
+ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
+ http.authorizeHttpRequests().anyRequest().fullyAuthenticated();
+ http.httpBasic().and().sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS);
http.csrf().disable();
+
+ return http.build();
}
-
+
private static String[] decode(String encoded) {
final byte[] decodedBytes
= Base64.getDecoder().decode(encoded.getBytes());
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagRequest.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagRequest.java index 79c58188..2677f5ba 100644 --- a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagRequest.java +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagRequest.java @@ -20,7 +20,7 @@ import java.util.ArrayList; import java.util.List;
import java.util.Objects;
-import javax.validation.Valid;
+import jakarta.validation.Valid;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagRequestInput.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagRequestInput.java index 4d78f404..36d5d20f 100644 --- a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagRequestInput.java +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagRequestInput.java @@ -15,7 +15,7 @@ ******************************************************************************/
package org.onap.ccsdk.apps.ms.vlantagapi.core.model;
-import javax.validation.Valid;
+import jakarta.validation.Valid;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagResponse.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagResponse.java index e830d5cf..0303627e 100644 --- a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagResponse.java +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagResponse.java @@ -20,7 +20,7 @@ import java.util.ArrayList; import java.util.List;
import java.util.Objects;
-import javax.validation.Valid;
+import jakarta.validation.Valid;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagResponseOutput.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagResponseOutput.java index b8f61bd8..d38ad235 100644 --- a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagResponseOutput.java +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagResponseOutput.java @@ -19,7 +19,7 @@ import java.util.ArrayList; import java.util.List;
import java.util.Objects;
-import javax.validation.Valid;
+import jakarta.validation.Valid;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagRequest.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagRequest.java index 8613c70f..f9f3baf6 100644 --- a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagRequest.java +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagRequest.java @@ -20,7 +20,7 @@ import java.util.ArrayList; import java.util.List;
import java.util.Objects;
-import javax.validation.Valid;
+import jakarta.validation.Valid;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagRequestInput.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagRequestInput.java index d0c272c5..c52249ec 100644 --- a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagRequestInput.java +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagRequestInput.java @@ -17,7 +17,7 @@ package org.onap.ccsdk.apps.ms.vlantagapi.core.model; import java.util.Objects;
-import javax.validation.Valid;
+import jakarta.validation.Valid;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagResponse.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagResponse.java index 4d2f1a51..260bb59f 100644 --- a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagResponse.java +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagResponse.java @@ -20,7 +20,7 @@ import java.util.ArrayList; import java.util.List;
import java.util.Objects;
-import javax.validation.Valid;
+import jakarta.validation.Valid;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagResponseOutput.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagResponseOutput.java index b7a0ff44..f18baa3e 100644 --- a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagResponseOutput.java +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagResponseOutput.java @@ -17,7 +17,7 @@ package org.onap.ccsdk.apps.ms.vlantagapi.core.model; import java.util.Objects;
-import javax.validation.Valid;
+import jakarta.validation.Valid;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/VlanTag.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/VlanTag.java index 1a207fd7..3ec53ca6 100644 --- a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/VlanTag.java +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/VlanTag.java @@ -17,7 +17,7 @@ package org.onap.ccsdk.apps.ms.vlantagapi.core.model; import java.util.Objects;
-import javax.validation.Valid;
+import jakarta.validation.Valid;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/VlantagApiService.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/VlantagApiService.java index 800346a7..b1774ab3 100644 --- a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/VlantagApiService.java +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/VlantagApiService.java @@ -15,7 +15,7 @@ ******************************************************************************/
package org.onap.ccsdk.apps.ms.vlantagapi.core.service;
-import javax.validation.Valid;
+import jakarta.validation.Valid;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
|