From 5b45447aa10219ffb5b54ce55bbd716bac151f15 Mon Sep 17 00:00:00 2001 From: Fabrice Bibonne Date: Wed, 17 Jan 2024 10:51:07 +0100 Subject: [PATCH] refactor(upgrade spring boot to 3.2) move to jakarta namespace --- pom.xml | 452 +++++++++--------- .../ConceptsCollectionService.java | 3 +- .../bauhaus_services/ConceptsService.java | 2 +- .../ConceptsCollectionServiceImpl.java | 2 +- .../concepts/ConceptsImpl.java | 2 +- .../collections/CollectionExportBuilder.java | 2 +- .../concepts/ConceptsExportBuilder.java | 2 +- .../rdf_utils/ObjectType.java | 2 +- .../rdf_utils/PublicationUtils.java | 2 +- .../rdf_utils/RepositoryGestion.java | 2 +- .../java/fr/insee/rmes/config/Config.java | 2 +- .../insee/rmes/config/LogRequestFilter.java | 2 +- .../sugoiModel/Application.java | 2 +- .../sugoiModel/Attributes.java | 2 +- .../user_roles_manager/sugoiModel/Group.java | 2 +- .../sugoiModel/UserSugoi.java | 2 +- .../sugoiModel/UsersSugoi.java | 2 +- .../concepts/ConceptsDatedNoteTypes.java | 2 +- .../concepts/ConceptsVersionnedNoteTypes.java | 2 +- .../java/fr/insee/rmes/utils/ExportUtils.java | 2 +- .../ConceptsCollectionsResources.java | 2 +- .../rmes/webservice/ConceptsResources.java | 2 +- 22 files changed, 243 insertions(+), 252 deletions(-) diff --git a/pom.xml b/pom.xml index 772462c9b..29711f053 100644 --- a/pom.xml +++ b/pom.xml @@ -1,51 +1,54 @@ - 4.0.0 - - - org.springframework.boot - spring-boot-starter-parent - 2.7.18 - - - - - fr.insee.rmes - Bauhaus-BO - war - 3.12.0 - Bauhaus-Back-Office - Back-office services for Bauhaus - https://github.com/InseeFr/Bauhaus-Back-Office - - - MIT License - http://www.opensource.org/licences/MIT - - - - INSEE - http://www.insee.fr - - - - Jérôme Bourgeois - jerome.bourgeois@insee.fr - - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 3.2.3 + + - - bauhaus - 17 + + fr.insee.rmes + Bauhaus-BO + jar + 3.13.0 + Bauhaus-Back-Office + Back-office services for Bauhaus + https://github.com/InseeFr/Bauhaus-Back-Office + + + MIT License + http://www.opensource.org/licences/MIT + + + + INSEE + http://www.insee.fr + + + + Jérôme Bourgeois + jerome.bourgeois@insee.fr + + + + + + bauhaus + 21 1.7.0 - 4.3.6 - 2.1.12 + + 4.3.9 + + 2.1.12 2.0.4 + 5.8.2 0.8.5 UTF-8 - 4.4.0 + 3.4.1 20231013 0.64.8 4.0.3 @@ -53,82 +56,83 @@ 12.3 - - src/main/java/fr/insee/rmes/queries/**/*, - src/main/java/fr/insee/rmes/modeles/**/* - ${project.groupId}:${project.artifactId} - jacoco - jacoco - reuseReports - java - ${project.basedir}/../target/jacoco.exec - 0.8.5 - 3.7.0.1746 - -Xms256m -Xmx512m -ea - -Dfile.encoding=UTF-8 - UTF-8 - + + src/main/java/fr/insee/rmes/queries/**/*, + src/main/java/fr/insee/rmes/modeles/**/* + + ${project.groupId}:${project.artifactId} + jacoco + jacoco + reuseReports + java + ${project.basedir}/../target/jacoco.exec + 0.8.5 + 3.7.0.1746 + -Xms256m -Xmx512m -ea + -Dfile.encoding=UTF-8 + + UTF-8 + - - - org.springframework.boot - spring-boot-starter-web - - - org.apache.logging.log4j - log4j-to-slf4j - - - org.springframework.boot - spring-boot-starter-tomcat - - - + + + org.springframework.boot + spring-boot-starter-web + + - - org.springframework.boot - spring-boot-starter-tomcat - provided - + + org.springframework.boot + spring-boot-starter-tomcat + - - com.fasterxml.jackson.dataformat - jackson-dataformat-xml - - - org.zeroturnaround - zt-zip - ${zt.version} - jar - - - com.sun.xml.bind - jaxb-impl - ${jaxb.version} - runtime - - - jakarta.servlet - jakarta.servlet-api - provided - + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + + + org.zeroturnaround + zt-zip + ${zt.version} + jar + + + com.sun.xml.bind + jaxb-impl + ${jaxb.version} + runtime + + + jakarta.servlet + jakarta.servlet-api + - - - org.springframework.boot - spring-boot-starter-oauth2-resource-server - - - org.springframework.boot - spring-boot-starter-security - + + jakarta.validation + jakarta.validation-api + + + + + org.springframework.boot + spring-boot-starter-oauth2-resource-server + + + org.springframework.boot + spring-boot-starter-security + + + + com.auth0 + java-jwt + ${java-jwt.version} + - - com.auth0 - java-jwt - ${java-jwt.version} - - @@ -142,14 +146,6 @@ test - - - org.mockito - mockito-inline - 4.5.1 - test - - org.springframework.security spring-security-test @@ -157,87 +153,87 @@ - - - org.springdoc - springdoc-openapi-ui - ${springdoc-openapi-ui.version} - + + + org.springdoc + springdoc-openapi-ui + ${springdoc-openapi-ui.version} + - - - org.eclipse.rdf4j - rdf4j-repository-http - ${rdf4j.version} - - - org.slf4j - jcl-over-slf4j - - - - - org.eclipse.rdf4j - rdf4j-queryresultio-sparqljson - ${rdf4j.version} - - - - org.eclipse.rdf4j - rdf4j-rio-trig - ${rdf4j.version} - - - - org.json - json - ${json.version} - + + + org.eclipse.rdf4j + rdf4j-repository-http + ${rdf4j.version} + + + org.slf4j + jcl-over-slf4j + + + + + org.eclipse.rdf4j + rdf4j-queryresultio-sparqljson + ${rdf4j.version} + + + + org.eclipse.rdf4j + rdf4j-rio-trig + ${rdf4j.version} + + + + org.json + json + ${json.version} + - - - org.apache.activemq - activemq-client - - - org.slf4j - slf4j-api - - - - - jakarta.jms - jakarta.jms-api - + + + org.apache.activemq + activemq-client + + + org.slf4j + slf4j-api + + + + + jakarta.jms + jakarta.jms-api + - - - net.sf.saxon - Saxon-HE - ${saxon.version} - - - xml-apis - xml-apis - - - + + + net.sf.saxon + Saxon-HE + ${saxon.version} + + + xml-apis + xml-apis + + + - - - org.freemarker - freemarker - - - fr.opensagres.xdocreport - fr.opensagres.xdocreport.document.odt - ${xdocreport.version} - - - fr.opensagres.xdocreport - fr.opensagres.xdocreport.template.freemarker - ${xdocreport.version} - + + + org.freemarker + freemarker + + + fr.opensagres.xdocreport + fr.opensagres.xdocreport.document.odt + ${xdocreport.version} + + + fr.opensagres.xdocreport + fr.opensagres.xdocreport.template.freemarker + ${xdocreport.version} + @@ -248,20 +244,16 @@ - - ${final.war.name} - src/main/java - - - org.springframework.boot - spring-boot-maven-plugin - - org.apache.tomcat.embed - - - - - + + src/main/java + + + org.springframework.boot + spring-boot-maven-plugin + + + + org.jacoco jacoco-maven-plugin ${jacoco.version} @@ -290,25 +282,25 @@ - - org.sonarsource.scanner.maven - sonar-maven-plugin - ${version.maven-sonar} - - - org.springdoc - springdoc-openapi-maven-plugin - 0.2 - - - integration-test - - generate - - - - - - + + org.sonarsource.scanner.maven + sonar-maven-plugin + ${version.maven-sonar} + + + org.springdoc + springdoc-openapi-maven-plugin + 0.2 + + + integration-test + + generate + + + + + + diff --git a/src/main/java/fr/insee/rmes/bauhaus_services/ConceptsCollectionService.java b/src/main/java/fr/insee/rmes/bauhaus_services/ConceptsCollectionService.java index ffe6259b0..4d29856cf 100644 --- a/src/main/java/fr/insee/rmes/bauhaus_services/ConceptsCollectionService.java +++ b/src/main/java/fr/insee/rmes/bauhaus_services/ConceptsCollectionService.java @@ -2,10 +2,9 @@ import fr.insee.rmes.exceptions.RmesException; import fr.insee.rmes.webservice.ConceptsCollectionsResources; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.http.ResponseEntity; -import javax.servlet.http.HttpServletResponse; - public interface ConceptsCollectionService { String getCollections() throws RmesException; diff --git a/src/main/java/fr/insee/rmes/bauhaus_services/ConceptsService.java b/src/main/java/fr/insee/rmes/bauhaus_services/ConceptsService.java index 7665c0744..a61d1a4be 100644 --- a/src/main/java/fr/insee/rmes/bauhaus_services/ConceptsService.java +++ b/src/main/java/fr/insee/rmes/bauhaus_services/ConceptsService.java @@ -5,7 +5,7 @@ import fr.insee.rmes.webservice.ConceptsCollectionsResources; import org.springframework.http.ResponseEntity; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.io.InputStream; import java.util.List; import java.util.Map; diff --git a/src/main/java/fr/insee/rmes/bauhaus_services/concepts/ConceptsCollectionServiceImpl.java b/src/main/java/fr/insee/rmes/bauhaus_services/concepts/ConceptsCollectionServiceImpl.java index ea8ceff06..69bf61043 100644 --- a/src/main/java/fr/insee/rmes/bauhaus_services/concepts/ConceptsCollectionServiceImpl.java +++ b/src/main/java/fr/insee/rmes/bauhaus_services/concepts/ConceptsCollectionServiceImpl.java @@ -21,7 +21,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.io.InputStream; import java.util.*; diff --git a/src/main/java/fr/insee/rmes/bauhaus_services/concepts/ConceptsImpl.java b/src/main/java/fr/insee/rmes/bauhaus_services/concepts/ConceptsImpl.java index 0fbe8807c..0a2542bd3 100644 --- a/src/main/java/fr/insee/rmes/bauhaus_services/concepts/ConceptsImpl.java +++ b/src/main/java/fr/insee/rmes/bauhaus_services/concepts/ConceptsImpl.java @@ -33,7 +33,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.io.InputStream; import java.util.*; diff --git a/src/main/java/fr/insee/rmes/bauhaus_services/concepts/collections/CollectionExportBuilder.java b/src/main/java/fr/insee/rmes/bauhaus_services/concepts/collections/CollectionExportBuilder.java index a088e28f4..29e0356e0 100644 --- a/src/main/java/fr/insee/rmes/bauhaus_services/concepts/collections/CollectionExportBuilder.java +++ b/src/main/java/fr/insee/rmes/bauhaus_services/concepts/collections/CollectionExportBuilder.java @@ -24,7 +24,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Component; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.InputStream; import java.text.Collator; diff --git a/src/main/java/fr/insee/rmes/bauhaus_services/concepts/concepts/ConceptsExportBuilder.java b/src/main/java/fr/insee/rmes/bauhaus_services/concepts/concepts/ConceptsExportBuilder.java index 283bf27ce..e5fa1fb2c 100644 --- a/src/main/java/fr/insee/rmes/bauhaus_services/concepts/concepts/ConceptsExportBuilder.java +++ b/src/main/java/fr/insee/rmes/bauhaus_services/concepts/concepts/ConceptsExportBuilder.java @@ -17,7 +17,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Component; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.io.InputStream; import java.util.Map; diff --git a/src/main/java/fr/insee/rmes/bauhaus_services/rdf_utils/ObjectType.java b/src/main/java/fr/insee/rmes/bauhaus_services/rdf_utils/ObjectType.java index 7dd0b9fd9..f2c099f41 100644 --- a/src/main/java/fr/insee/rmes/bauhaus_services/rdf_utils/ObjectType.java +++ b/src/main/java/fr/insee/rmes/bauhaus_services/rdf_utils/ObjectType.java @@ -2,11 +2,11 @@ import fr.insee.rmes.bauhaus_services.Constants; import fr.insee.rmes.persistance.ontologies.*; +import jakarta.validation.constraints.NotNull; import org.eclipse.rdf4j.model.IRI; import org.eclipse.rdf4j.model.vocabulary.FOAF; import org.eclipse.rdf4j.model.vocabulary.SKOS; -import javax.validation.constraints.NotNull; import java.util.Arrays; import java.util.Objects; import java.util.Optional; diff --git a/src/main/java/fr/insee/rmes/bauhaus_services/rdf_utils/PublicationUtils.java b/src/main/java/fr/insee/rmes/bauhaus_services/rdf_utils/PublicationUtils.java index d49535c1e..bcb7ad7fe 100644 --- a/src/main/java/fr/insee/rmes/bauhaus_services/rdf_utils/PublicationUtils.java +++ b/src/main/java/fr/insee/rmes/bauhaus_services/rdf_utils/PublicationUtils.java @@ -2,11 +2,11 @@ import fr.insee.rmes.bauhaus_services.Constants; import fr.insee.rmes.model.ValidationStatus; +import jakarta.validation.constraints.NotNull; import org.eclipse.rdf4j.model.Resource; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; -import javax.validation.constraints.NotNull; import java.util.Arrays; import static fr.insee.rmes.config.PropertiesKeys.BASE_URI_GESTION; diff --git a/src/main/java/fr/insee/rmes/bauhaus_services/rdf_utils/RepositoryGestion.java b/src/main/java/fr/insee/rmes/bauhaus_services/rdf_utils/RepositoryGestion.java index d1fc4e77c..58a7e79a3 100644 --- a/src/main/java/fr/insee/rmes/bauhaus_services/rdf_utils/RepositoryGestion.java +++ b/src/main/java/fr/insee/rmes/bauhaus_services/rdf_utils/RepositoryGestion.java @@ -20,7 +20,7 @@ import org.springframework.http.HttpStatus; import org.springframework.stereotype.Component; -import javax.annotation.PostConstruct; +import jakarta.annotation.PostConstruct; import java.io.File; import java.io.InputStream; import java.util.Arrays; diff --git a/src/main/java/fr/insee/rmes/config/Config.java b/src/main/java/fr/insee/rmes/config/Config.java index 3ace4c2b1..85c78d4ec 100644 --- a/src/main/java/fr/insee/rmes/config/Config.java +++ b/src/main/java/fr/insee/rmes/config/Config.java @@ -6,7 +6,7 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; -import javax.annotation.PostConstruct; +import jakarta.annotation.PostConstruct; import static fr.insee.rmes.config.PropertiesKeys.*; diff --git a/src/main/java/fr/insee/rmes/config/LogRequestFilter.java b/src/main/java/fr/insee/rmes/config/LogRequestFilter.java index 11bb5b0cf..45038e22e 100644 --- a/src/main/java/fr/insee/rmes/config/LogRequestFilter.java +++ b/src/main/java/fr/insee/rmes/config/LogRequestFilter.java @@ -10,7 +10,7 @@ import org.springframework.stereotype.Component; import org.springframework.web.filter.AbstractRequestLoggingFilter; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.util.Optional; import static java.util.Optional.empty; diff --git a/src/main/java/fr/insee/rmes/external_services/authentication/user_roles_manager/sugoiModel/Application.java b/src/main/java/fr/insee/rmes/external_services/authentication/user_roles_manager/sugoiModel/Application.java index b056d07da..c601b8ca5 100644 --- a/src/main/java/fr/insee/rmes/external_services/authentication/user_roles_manager/sugoiModel/Application.java +++ b/src/main/java/fr/insee/rmes/external_services/authentication/user_roles_manager/sugoiModel/Application.java @@ -2,7 +2,7 @@ import com.fasterxml.jackson.annotation.*; -import javax.annotation.Generated; +import jakarta.annotation.Generated; import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/src/main/java/fr/insee/rmes/external_services/authentication/user_roles_manager/sugoiModel/Attributes.java b/src/main/java/fr/insee/rmes/external_services/authentication/user_roles_manager/sugoiModel/Attributes.java index 5b4456725..33725e926 100644 --- a/src/main/java/fr/insee/rmes/external_services/authentication/user_roles_manager/sugoiModel/Attributes.java +++ b/src/main/java/fr/insee/rmes/external_services/authentication/user_roles_manager/sugoiModel/Attributes.java @@ -2,7 +2,7 @@ import com.fasterxml.jackson.annotation.*; -import javax.annotation.Generated; +import jakarta.annotation.Generated; import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/src/main/java/fr/insee/rmes/external_services/authentication/user_roles_manager/sugoiModel/Group.java b/src/main/java/fr/insee/rmes/external_services/authentication/user_roles_manager/sugoiModel/Group.java index 4f9b249e9..24e691741 100644 --- a/src/main/java/fr/insee/rmes/external_services/authentication/user_roles_manager/sugoiModel/Group.java +++ b/src/main/java/fr/insee/rmes/external_services/authentication/user_roles_manager/sugoiModel/Group.java @@ -2,7 +2,7 @@ import com.fasterxml.jackson.annotation.*; -import javax.annotation.Generated; +import jakarta.annotation.Generated; import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/src/main/java/fr/insee/rmes/external_services/authentication/user_roles_manager/sugoiModel/UserSugoi.java b/src/main/java/fr/insee/rmes/external_services/authentication/user_roles_manager/sugoiModel/UserSugoi.java index af0f04db1..752e4123b 100644 --- a/src/main/java/fr/insee/rmes/external_services/authentication/user_roles_manager/sugoiModel/UserSugoi.java +++ b/src/main/java/fr/insee/rmes/external_services/authentication/user_roles_manager/sugoiModel/UserSugoi.java @@ -2,7 +2,7 @@ import com.fasterxml.jackson.annotation.*; -import javax.annotation.Generated; +import jakarta.annotation.Generated; import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/src/main/java/fr/insee/rmes/external_services/authentication/user_roles_manager/sugoiModel/UsersSugoi.java b/src/main/java/fr/insee/rmes/external_services/authentication/user_roles_manager/sugoiModel/UsersSugoi.java index 4f23be272..9dd1e9ab7 100644 --- a/src/main/java/fr/insee/rmes/external_services/authentication/user_roles_manager/sugoiModel/UsersSugoi.java +++ b/src/main/java/fr/insee/rmes/external_services/authentication/user_roles_manager/sugoiModel/UsersSugoi.java @@ -2,7 +2,7 @@ import com.fasterxml.jackson.annotation.*; -import javax.annotation.Generated; +import jakarta.annotation.Generated; import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/src/main/java/fr/insee/rmes/model/notes/concepts/ConceptsDatedNoteTypes.java b/src/main/java/fr/insee/rmes/model/notes/concepts/ConceptsDatedNoteTypes.java index 6ea982e76..65954b85d 100644 --- a/src/main/java/fr/insee/rmes/model/notes/concepts/ConceptsDatedNoteTypes.java +++ b/src/main/java/fr/insee/rmes/model/notes/concepts/ConceptsDatedNoteTypes.java @@ -1,12 +1,12 @@ package fr.insee.rmes.model.notes.concepts; import fr.insee.rmes.config.Config; +import jakarta.annotation.PostConstruct; import org.eclipse.rdf4j.model.IRI; import org.eclipse.rdf4j.model.vocabulary.SKOS; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import javax.annotation.PostConstruct; import java.util.EnumSet; diff --git a/src/main/java/fr/insee/rmes/model/notes/concepts/ConceptsVersionnedNoteTypes.java b/src/main/java/fr/insee/rmes/model/notes/concepts/ConceptsVersionnedNoteTypes.java index d9ad3487a..69777f594 100644 --- a/src/main/java/fr/insee/rmes/model/notes/concepts/ConceptsVersionnedNoteTypes.java +++ b/src/main/java/fr/insee/rmes/model/notes/concepts/ConceptsVersionnedNoteTypes.java @@ -2,12 +2,12 @@ import fr.insee.rmes.config.Config; +import jakarta.annotation.PostConstruct; import org.eclipse.rdf4j.model.IRI; import org.eclipse.rdf4j.model.vocabulary.SKOS; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import javax.annotation.PostConstruct; import java.util.EnumSet; import java.util.HashMap; import java.util.Map; diff --git a/src/main/java/fr/insee/rmes/utils/ExportUtils.java b/src/main/java/fr/insee/rmes/utils/ExportUtils.java index 54ca9489e..1e9c6b007 100644 --- a/src/main/java/fr/insee/rmes/utils/ExportUtils.java +++ b/src/main/java/fr/insee/rmes/utils/ExportUtils.java @@ -17,7 +17,7 @@ import org.springframework.http.*; import org.springframework.stereotype.Component; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import javax.xml.transform.TransformerException; import java.io.*; import java.nio.charset.StandardCharsets; diff --git a/src/main/java/fr/insee/rmes/webservice/ConceptsCollectionsResources.java b/src/main/java/fr/insee/rmes/webservice/ConceptsCollectionsResources.java index 60cb12102..f79058633 100644 --- a/src/main/java/fr/insee/rmes/webservice/ConceptsCollectionsResources.java +++ b/src/main/java/fr/insee/rmes/webservice/ConceptsCollectionsResources.java @@ -22,7 +22,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; @RestController @RequestMapping("/concepts-collections") diff --git a/src/main/java/fr/insee/rmes/webservice/ConceptsResources.java b/src/main/java/fr/insee/rmes/webservice/ConceptsResources.java index fb52ad969..5f7869f7c 100644 --- a/src/main/java/fr/insee/rmes/webservice/ConceptsResources.java +++ b/src/main/java/fr/insee/rmes/webservice/ConceptsResources.java @@ -26,7 +26,7 @@ import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; /** * WebService class for resources of Concepts