From 7cc9a44b229f7dcbc34fcfdc7d42a21e3664e450 Mon Sep 17 00:00:00 2001 From: Bogdan Sava Date: Thu, 23 Mar 2023 06:31:05 +0200 Subject: [PATCH 1/6] bootJar with PropertiesLauncher Signed-off-by: Bogdan Sava --- .../user-interfaces/ui-chassis/ui-chassis-spring/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/build.gradle b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/build.gradle index 7084926e1c0..83d6ffb7da0 100644 --- a/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/build.gradle +++ b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/build.gradle @@ -83,8 +83,8 @@ description = 'UI Server Platform Chassis for Spring' bootJar { manifest { -// attributes 'Main-Class': 'org.springframework.boot.loader.PropertiesLauncher' - mainClass = 'org.odpi.openmetadata.userinterface.uichassis.springboot.EgeriaUIPlatform' + attributes 'Main-Class': 'org.springframework.boot.loader.PropertiesLauncher' +// mainClass = 'org.odpi.openmetadata.userinterface.uichassis.springboot.EgeriaUIPlatform' } } From 9b9d1b3ae4552edfe68ba6a460410039f0db5bcb Mon Sep 17 00:00:00 2001 From: Bogdan Sava Date: Thu, 23 Mar 2023 08:41:30 +0200 Subject: [PATCH 2/6] replace javax with jakarta validation api Signed-off-by: Bogdan Sava --- .../glossary-view/glossary-view-spring/build.gradle | 2 +- .../server/spring/CategoryResource.java | 13 ++++++++----- .../server/spring/GlossaryResource.java | 12 ++++++++---- .../glossaryview/server/spring/TermResource.java | 13 ++++++++----- .../server/spring/GroupConfigurationResource.java | 6 ++++-- 5 files changed, 29 insertions(+), 17 deletions(-) diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/build.gradle b/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/build.gradle index ad22fa884ee..11372c464b9 100644 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/build.gradle +++ b/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/build.gradle @@ -8,7 +8,7 @@ dependencies { implementation project(':open-metadata-implementation:access-services:glossary-view:glossary-view-server') implementation project(':open-metadata-implementation:access-services:glossary-view:glossary-view-api') implementation 'org.springframework:spring-web' - implementation 'javax.validation:validation-api' + implementation 'jakarta.validation:jakarta.validation-api' implementation 'org.springframework:spring-context' implementation 'io.swagger.core.v3:swagger-annotations' compileOnly 'com.fasterxml.jackson.core:jackson-annotations' diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/CategoryResource.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/CategoryResource.java index d1cbb76fb90..2473b4bf46d 100644 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/CategoryResource.java +++ b/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/CategoryResource.java @@ -4,6 +4,9 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.validation.constraints.Max; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.PositiveOrZero; import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetailResponse; import org.odpi.openmetadata.accessservices.glossaryview.server.service.CategoryService; import org.springframework.validation.annotation.Validated; @@ -13,10 +16,6 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import javax.validation.constraints.Max; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.PositiveOrZero; - import static org.odpi.openmetadata.accessservices.glossaryview.server.spring.OmasRegistration.PAGE_FROM_DEFAULT_VALUE; import static org.odpi.openmetadata.accessservices.glossaryview.server.spring.OmasRegistration.PAGE_SIZE_DEFAULT_VALUE; import static org.odpi.openmetadata.accessservices.glossaryview.server.spring.OmasRegistration.PAGE_SIZE_MAX_VALUE; @@ -28,7 +27,11 @@ @Validated @RequestMapping("/servers/{serverName}/open-metadata/access-services/glossary-view/users/{userId}") -@Tag(name="Glossary View OMAS", description="The Glossary View OMAS provides APIs and events for retrieving glossaries, categories and terms.", externalDocs=@ExternalDocumentation(description="Glossary View Open Metadata Access Service (OMAS)",url="https://egeria-project.org/services/omas/glossary-view/overview/")) +@Tag(name="Glossary View OMAS", + description="The Glossary View OMAS provides APIs and events for retrieving glossaries, categories and terms.", + externalDocs=@ExternalDocumentation( + description="Glossary View Open Metadata Access Service (OMAS)", + url="https://egeria-project.org/services/omas/glossary-view/overview/")) public class CategoryResource { diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/GlossaryResource.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/GlossaryResource.java index 0b5fd66bd56..03b32783028 100644 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/GlossaryResource.java +++ b/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/GlossaryResource.java @@ -4,6 +4,9 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.validation.constraints.Max; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.PositiveOrZero; import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetailResponse; import org.odpi.openmetadata.accessservices.glossaryview.server.service.GlossaryService; import org.springframework.validation.annotation.Validated; @@ -13,9 +16,6 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import javax.validation.constraints.Max; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.PositiveOrZero; import static org.odpi.openmetadata.accessservices.glossaryview.server.spring.OmasRegistration.PAGE_FROM_DEFAULT_VALUE; import static org.odpi.openmetadata.accessservices.glossaryview.server.spring.OmasRegistration.PAGE_SIZE_DEFAULT_VALUE; @@ -28,7 +28,11 @@ @Validated @RequestMapping("/servers/{serverName}/open-metadata/access-services/glossary-view/users/{userId}") -@Tag(name="Glossary View OMAS", description="The Glossary View OMAS provides APIs and events for retrieving glossaries, categories and terms.", externalDocs=@ExternalDocumentation(description="Glossary View Open Metadata Access Service (OMAS)",url="https://egeria-project.org/services/omas/glossary-view/overview/")) +@Tag(name="Glossary View OMAS", + description="The Glossary View OMAS provides APIs and events for retrieving glossaries, categories and terms.", + externalDocs=@ExternalDocumentation( + description="Glossary View Open Metadata Access Service (OMAS)", + url="https://egeria-project.org/services/omas/glossary-view/overview/")) public class GlossaryResource { diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/TermResource.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/TermResource.java index 6eca940f84c..23701e29348 100644 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/TermResource.java +++ b/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/TermResource.java @@ -4,6 +4,9 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.validation.constraints.Max; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.PositiveOrZero; import org.odpi.openmetadata.accessservices.glossaryview.rest.GlossaryViewEntityDetailResponse; import org.odpi.openmetadata.accessservices.glossaryview.server.service.TermService; import org.springframework.validation.annotation.Validated; @@ -13,10 +16,6 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import javax.validation.constraints.Max; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.PositiveOrZero; - import static org.odpi.openmetadata.accessservices.glossaryview.server.spring.OmasRegistration.PAGE_FROM_DEFAULT_VALUE; import static org.odpi.openmetadata.accessservices.glossaryview.server.spring.OmasRegistration.PAGE_SIZE_DEFAULT_VALUE; import static org.odpi.openmetadata.accessservices.glossaryview.server.spring.OmasRegistration.PAGE_SIZE_MAX_VALUE; @@ -28,7 +27,11 @@ @Validated @RequestMapping("/servers/{serverName}/open-metadata/access-services/glossary-view/users/{userId}") -@Tag(name="Glossary View OMAS", description="The Glossary View OMAS provides APIs and events for retrieving glossaries, categories and terms.", externalDocs=@ExternalDocumentation(description="Glossary View Open Metadata Access Service (OMAS)",url="https://egeria-project.org/services/omas/glossary-view/overview/")) +@Tag(name="Glossary View OMAS", + description="The Glossary View OMAS provides APIs and events for retrieving glossaries, categories and terms.", + externalDocs=@ExternalDocumentation( + description="Glossary View Open Metadata Access Service (OMAS)", + url="https://egeria-project.org/services/omas/glossary-view/overview/")) public class TermResource { diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/server/spring/GroupConfigurationResource.java b/open-metadata-implementation/access-services/governance-engine/governance-engine-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/server/spring/GroupConfigurationResource.java index f7404d35767..393057f656c 100644 --- a/open-metadata-implementation/access-services/governance-engine/governance-engine-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/server/spring/GroupConfigurationResource.java +++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/server/spring/GroupConfigurationResource.java @@ -22,8 +22,10 @@ @RestController @RequestMapping("/servers/{serverName}/open-metadata/access-services/governance-engine/users/{userId}") -@Tag(name="Governance Engine OMAS", description="The Governance Engine Open Metadata Access Service (OMAS) provides support for governance engines, services and actions.", - externalDocs=@ExternalDocumentation(description="Governance Engine Open Metadata Access Service (OMAS)", +@Tag(name="Governance Engine OMAS", + description="The Governance Engine Open Metadata Access Service (OMAS) provides support for governance engines, services and actions.", + externalDocs=@ExternalDocumentation( + description="Governance Engine Open Metadata Access Service (OMAS)", url="https://egeria-project.org/services/omas/governance-engine/overview/")) public class GroupConfigurationResource From 020f2e6456fd66e3577a27ba3a014c7a583f500a Mon Sep 17 00:00:00 2001 From: Bogdan Sava Date: Thu, 23 Mar 2023 08:42:18 +0200 Subject: [PATCH 3/6] removed redundant annotation Signed-off-by: Bogdan Sava --- .../serverchassis/springboot/OMAGServerPlatform.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/open-metadata-implementation/server-chassis/server-chassis-spring/src/main/java/org/odpi/openmetadata/serverchassis/springboot/OMAGServerPlatform.java b/open-metadata-implementation/server-chassis/server-chassis-spring/src/main/java/org/odpi/openmetadata/serverchassis/springboot/OMAGServerPlatform.java index 384c2542468..8174a7d9f00 100644 --- a/open-metadata-implementation/server-chassis/server-chassis-spring/src/main/java/org/odpi/openmetadata/serverchassis/springboot/OMAGServerPlatform.java +++ b/open-metadata-implementation/server-chassis/server-chassis-spring/src/main/java/org/odpi/openmetadata/serverchassis/springboot/OMAGServerPlatform.java @@ -66,8 +66,6 @@ url="https://egeria-project.org/concepts/omag-server-platform/") ) - -@Configuration public class OMAGServerPlatform { @Value("${strict.ssl}") @@ -227,7 +225,7 @@ public FilterRegistrationBean getRequestHeadersFilter( FilterRegistrationBean registrationBean = new FilterRegistrationBean<>(); registrationBean.setFilter(new HttpRequestHeadersFilter(headerNames)); - registrationBean.addUrlPatterns("/*"); + registrationBean.addUrlPatterns("/open-metadata/*"); registrationBean.setOrder(1); return registrationBean; From dd976322de10f3fb50b0ac9dd7442f999da8e931 Mon Sep 17 00:00:00 2001 From: Bogdan Sava Date: Thu, 23 Mar 2023 08:43:25 +0200 Subject: [PATCH 4/6] make fields final Signed-off-by: Bogdan Sava --- .../glossaryview/server/spring/CategoryResource.java | 2 +- .../glossaryview/server/spring/GlossaryResource.java | 2 +- .../accessservices/glossaryview/server/spring/TermResource.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/CategoryResource.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/CategoryResource.java index 2473b4bf46d..a9766ecf2cb 100644 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/CategoryResource.java +++ b/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/CategoryResource.java @@ -35,7 +35,7 @@ public class CategoryResource { - private CategoryService categoryService; + private final CategoryService categoryService; /** * Called by Spring diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/GlossaryResource.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/GlossaryResource.java index 03b32783028..60e7ebe6bc9 100644 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/GlossaryResource.java +++ b/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/GlossaryResource.java @@ -36,7 +36,7 @@ public class GlossaryResource { - private GlossaryService glossaryService; + private final GlossaryService glossaryService; /** * Called by Spring diff --git a/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/TermResource.java b/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/TermResource.java index 23701e29348..9c6bd2d1752 100644 --- a/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/TermResource.java +++ b/open-metadata-implementation/access-services/glossary-view/glossary-view-spring/src/main/java/org/odpi/openmetadata/accessservices/glossaryview/server/spring/TermResource.java @@ -35,7 +35,7 @@ public class TermResource { - private TermService termService; + private final TermService termService; /** * Called by Spring From 4b9ff26b317b37bf6b57eee201b005ce3ff29c47 Mon Sep 17 00:00:00 2001 From: Bogdan Sava Date: Thu, 23 Mar 2023 08:49:48 +0200 Subject: [PATCH 5/6] replace javax with jakarta validation api Signed-off-by: Bogdan Sava --- .../asset-catalog/asset-catalog-api/build.gradle | 2 +- .../assetcatalog/model/rest/body/SearchParameters.java | 2 +- .../asset-catalog/asset-catalog-spring/build.gradle | 2 +- .../server/spring/AssetCatalogEntityResource.java | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/build.gradle b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/build.gradle index b2f04d8586c..41c511b466f 100644 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/build.gradle +++ b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/build.gradle @@ -11,7 +11,7 @@ dependencies { compileOnly 'com.fasterxml.jackson.core:jackson-annotations' implementation project(':open-metadata-implementation:common-services:ffdc-services') implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation 'javax.validation:validation-api' + implementation 'jakarta.validation:jakarta.validation-api' implementation project(':open-metadata-implementation:frameworks:audit-log-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') } diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/body/SearchParameters.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/body/SearchParameters.java index d3fc2987773..b393c5fd8b9 100644 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/body/SearchParameters.java +++ b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/model/rest/body/SearchParameters.java @@ -5,13 +5,13 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import jakarta.validation.constraints.PositiveOrZero; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; import lombok.ToString; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; -import javax.validation.constraints.PositiveOrZero; import java.io.Serializable; import java.util.List; diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-spring/build.gradle b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-spring/build.gradle index 08da0dff10c..51d2f834b31 100644 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-spring/build.gradle +++ b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-spring/build.gradle @@ -11,7 +11,7 @@ dependencies { implementation project(':open-metadata-implementation:common-services:ffdc-services') implementation 'org.springframework:spring-web' implementation 'org.springframework:spring-core' - implementation 'javax.validation:validation-api' + implementation 'jakarta.validation:jakarta.validation-api:' implementation 'io.swagger.core.v3:swagger-annotations' testImplementation 'org.mockito:mockito-core' testImplementation 'org.mockito:mockito-junit-jupiter' diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-spring/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/server/spring/AssetCatalogEntityResource.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-spring/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/server/spring/AssetCatalogEntityResource.java index c8cc0a45547..250133ee79c 100644 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-spring/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/server/spring/AssetCatalogEntityResource.java +++ b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-spring/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/server/spring/AssetCatalogEntityResource.java @@ -4,6 +4,9 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.PositiveOrZero; import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.body.SearchParameters; import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.*; import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetCatalogResponse; @@ -19,9 +22,6 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.PositiveOrZero; /** * The AssetCatalogEntityResource provides the server-side implementation of the From 894b8cd23d667fa9db7e1646019e616207c8c983 Mon Sep 17 00:00:00 2001 From: Bogdan Sava Date: Thu, 23 Mar 2023 08:50:42 +0200 Subject: [PATCH 6/6] remove javax validation api Signed-off-by: Bogdan Sava --- bom/build.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/bom/build.gradle b/bom/build.gradle index 61ba2420815..4b5045fb1b0 100644 --- a/bom/build.gradle +++ b/bom/build.gradle @@ -160,7 +160,6 @@ dependencies { api("io.openlineage:openlineage-java:${openlineageVersion}") api("jakarta.persistence:jakarta.persistence-api:${jakartapersistenceVersion}") api("jakarta.validation:jakarta.validation-api:${jakartavalidationVersion}") - api("javax.validation:validation-api:${validationVersion}") api("javax.xml.bind:jaxb-api:${jaxbVersion}") api("org.apache.avro:avro:${avroVersion}") api("org.apache.commons:commons-collections4:${collections4Version}")