You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2021/05/21 09:08:13 UTC

[syncope] branch master updated: Upgrading Spring Boot and cleaning up some dependencies

This is an automated email from the ASF dual-hosted git repository.

ilgrosso pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/syncope.git


The following commit(s) were added to refs/heads/master by this push:
     new c651cd1  Upgrading Spring Boot and cleaning up some dependencies
c651cd1 is described below

commit c651cd1d3e958d985e4e3a6d36891b5f6ae87e82
Author: Francesco Chicchiriccò <il...@apache.org>
AuthorDate: Fri May 21 10:50:07 2021 +0200

    Upgrading Spring Boot and cleaning up some dependencies
---
 client/idrepo/lib/pom.xml                          |   1 -
 core/idm/logic/pom.xml                             |   1 -
 core/idrepo/rest-cxf/pom.xml                       |   1 -
 core/persistence-api/pom.xml                       |   1 -
 core/persistence-jpa-json/pom.xml                  |   1 -
 core/persistence-jpa/pom.xml                       |   1 -
 core/provisioning-api/pom.xml                      |  10 +-
 core/provisioning-java/pom.xml                     |   1 -
 core/spring/pom.xml                                |  34 +++----
 .../syncope/core/spring/ImplementationManager.java |   3 +-
 core/starter/pom.xml                               |   4 -
 pom.xml                                            | 110 +--------------------
 sra/pom.xml                                        |  26 -----
 .../java/org/apache/syncope/sra/ActuatorTest.java  |   4 +-
 .../apache/syncope/wa/starter/AbstractTest.java    |   2 +-
 15 files changed, 21 insertions(+), 179 deletions(-)

diff --git a/client/idrepo/lib/pom.xml b/client/idrepo/lib/pom.xml
index 904d9f8..103421e 100644
--- a/client/idrepo/lib/pom.xml
+++ b/client/idrepo/lib/pom.xml
@@ -73,7 +73,6 @@ under the License.
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-simple</artifactId>
-      <version>${slf4j.version}</version>
       <scope>test</scope>
     </dependency>        
     <dependency>
diff --git a/core/idm/logic/pom.xml b/core/idm/logic/pom.xml
index 02c3def..ccad8b4 100644
--- a/core/idm/logic/pom.xml
+++ b/core/idm/logic/pom.xml
@@ -69,7 +69,6 @@ under the License.
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-simple</artifactId>
-      <version>${slf4j.version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>
diff --git a/core/idrepo/rest-cxf/pom.xml b/core/idrepo/rest-cxf/pom.xml
index ddb6baf..5a5bf85 100644
--- a/core/idrepo/rest-cxf/pom.xml
+++ b/core/idrepo/rest-cxf/pom.xml
@@ -125,7 +125,6 @@ under the License.
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-simple</artifactId>
-      <version>${slf4j.version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>
diff --git a/core/persistence-api/pom.xml b/core/persistence-api/pom.xml
index 9e16df3..19d0fdd 100644
--- a/core/persistence-api/pom.xml
+++ b/core/persistence-api/pom.xml
@@ -82,7 +82,6 @@ under the License.
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-simple</artifactId>
-      <version>${slf4j.version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>
diff --git a/core/persistence-jpa-json/pom.xml b/core/persistence-jpa-json/pom.xml
index 55ee0e3..f56f7cc 100644
--- a/core/persistence-jpa-json/pom.xml
+++ b/core/persistence-jpa-json/pom.xml
@@ -63,7 +63,6 @@ under the License.
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-simple</artifactId>
-      <version>${slf4j.version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>
diff --git a/core/persistence-jpa/pom.xml b/core/persistence-jpa/pom.xml
index 6536c21..221d592 100644
--- a/core/persistence-jpa/pom.xml
+++ b/core/persistence-jpa/pom.xml
@@ -105,7 +105,6 @@ under the License.
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-simple</artifactId>
-      <version>${slf4j.version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>
diff --git a/core/provisioning-api/pom.xml b/core/provisioning-api/pom.xml
index 68289e8..10cac1e 100644
--- a/core/provisioning-api/pom.xml
+++ b/core/provisioning-api/pom.xml
@@ -58,10 +58,6 @@ under the License.
     </dependency>
     <dependency>
       <groupId>org.springframework</groupId>
-      <artifactId>spring-test</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
       <artifactId>spring-tx</artifactId>
     </dependency>
 
@@ -79,7 +75,11 @@ under the License.
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-simple</artifactId>
-      <version>${slf4j.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-test</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>
diff --git a/core/provisioning-java/pom.xml b/core/provisioning-java/pom.xml
index fdc77f2..d850ded 100644
--- a/core/provisioning-java/pom.xml
+++ b/core/provisioning-java/pom.xml
@@ -124,7 +124,6 @@ under the License.
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-simple</artifactId>
-      <version>${slf4j.version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>
diff --git a/core/spring/pom.xml b/core/spring/pom.xml
index 2a49d80..56c7b36 100644
--- a/core/spring/pom.xml
+++ b/core/spring/pom.xml
@@ -54,31 +54,20 @@ under the License.
       <artifactId>jasypt</artifactId>
     </dependency>
 
-      <dependency>
-        <groupId>com.nimbusds</groupId>
-        <artifactId>nimbus-jose-jwt</artifactId>
-      </dependency>
-
-      <dependency>
-      <groupId>org.springframework.boot</groupId>
-      <artifactId>spring-boot-autoconfigure</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.springframework.security</groupId>
-      <artifactId>spring-security-core</artifactId>
-    </dependency>
     <dependency>
-      <groupId>org.springframework.security</groupId>
-      <artifactId>spring-security-config</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.security</groupId>
-      <artifactId>spring-security-web</artifactId>
+      <groupId>com.nimbusds</groupId>
+      <artifactId>nimbus-jose-jwt</artifactId>
     </dependency>
+
     <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-tx</artifactId>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-security</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>org.springframework.boot</groupId>
+          <artifactId>spring-boot-starter-logging</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
 
     <dependency>
@@ -116,7 +105,6 @@ under the License.
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-simple</artifactId>
-      <version>${slf4j.version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>
diff --git a/core/spring/src/main/java/org/apache/syncope/core/spring/ImplementationManager.java b/core/spring/src/main/java/org/apache/syncope/core/spring/ImplementationManager.java
index 6b637d8..08b1b4b 100644
--- a/core/spring/src/main/java/org/apache/syncope/core/spring/ImplementationManager.java
+++ b/core/spring/src/main/java/org/apache/syncope/core/spring/ImplementationManager.java
@@ -231,8 +231,7 @@ public final class ImplementationManager {
                 if (beanFactory.containsSingleton(domainableBeanNameWithConf)) {
                     return (T) beanFactory.getSingleton(domainableBeanNameWithConf);
                 } else {
-                    T bean = (T) beanFactory.
-                            createBean(clazz, AbstractBeanDefinition.AUTOWIRE_BY_TYPE, false);
+                    T bean = (T) beanFactory.createBean(clazz, AbstractBeanDefinition.AUTOWIRE_BY_TYPE, false);
                     beanFactory.registerSingleton(domainableBeanNameWithConf, bean);
                     return bean;
                 }
diff --git a/core/starter/pom.xml b/core/starter/pom.xml
index 18eb797..e094338 100644
--- a/core/starter/pom.xml
+++ b/core/starter/pom.xml
@@ -52,10 +52,6 @@ under the License.
       <groupId>org.springframework.boot</groupId>
       <artifactId>spring-boot-starter-log4j2</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.springframework.boot</groupId>
-      <artifactId>spring-boot-starter-security</artifactId>
-    </dependency>
     
     <dependency>
       <groupId>org.apache.syncope.core.idrepo</groupId>
diff --git a/pom.xml b/pom.xml
index 14980c0..c8cf8d9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -410,9 +410,7 @@ under the License.
 
     <jackson.version>2.12.3</jackson.version>
 
-    <spring.version>5.3.7</spring.version>
-    <spring-security.version>5.5.0</spring-security.version>
-    <spring-boot.version>2.4.5</spring-boot.version>
+    <spring-boot.version>2.5.0</spring-boot.version>
     <spring-cloud-gateway.version>3.0.2</spring-cloud-gateway.version>
 
     <openjpa.version>3.2.0</openjpa.version>
@@ -1014,106 +1012,6 @@ under the License.
       </dependency>
 
       <dependency>
-        <groupId>org.springframework</groupId>
-        <artifactId>spring-core</artifactId>
-        <version>${spring.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.springframework</groupId>
-        <artifactId>spring-beans</artifactId>
-        <version>${spring.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.springframework</groupId>
-        <artifactId>spring-jcl</artifactId>
-        <version>${spring.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.springframework</groupId>
-        <artifactId>spring-context</artifactId>
-        <version>${spring.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.springframework</groupId>
-        <artifactId>spring-context-support</artifactId>
-        <version>${spring.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.springframework</groupId>
-        <artifactId>spring-tx</artifactId>
-        <version>${spring.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.springframework</groupId>
-        <artifactId>spring-jdbc</artifactId>
-        <version>${spring.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.springframework</groupId>
-        <artifactId>spring-orm</artifactId>
-        <version>${spring.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.springframework</groupId>
-        <artifactId>spring-web</artifactId>
-        <version>${spring.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.springframework</groupId>
-        <artifactId>spring-webmvc</artifactId>
-        <version>${spring.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.springframework</groupId>
-        <artifactId>spring-aop</artifactId>
-        <version>${spring.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.springframework</groupId>
-        <artifactId>spring-expression</artifactId>
-        <version>${spring.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.springframework.security</groupId>
-        <artifactId>spring-security-core</artifactId>
-        <version>${spring-security.version}</version>
-        <exclusions>
-          <exclusion>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-beans</artifactId>
-          </exclusion>
-          <exclusion>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-core</artifactId>
-          </exclusion>
-          <exclusion>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-expression</artifactId>
-          </exclusion>
-        </exclusions>
-      </dependency>
-      <dependency>
-        <groupId>org.springframework.security</groupId>
-        <artifactId>spring-security-web</artifactId>
-        <version>${spring-security.version}</version>
-        <exclusions>
-          <exclusion>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-beans</artifactId>
-          </exclusion>
-          <exclusion>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-core</artifactId>
-          </exclusion>
-        </exclusions>
-      </dependency>
-      <dependency>
-        <groupId>org.springframework.security</groupId>
-        <artifactId>spring-security-config</artifactId>
-        <version>${spring-security.version}</version>
-      </dependency>
-
-      <dependency>
         <groupId>org.aspectj</groupId>
         <artifactId>aspectjweaver</artifactId>
         <version>1.9.6</version>
@@ -2137,12 +2035,6 @@ under the License.
       </dependency>
 
       <dependency>
-        <groupId>org.springframework</groupId>
-        <artifactId>spring-test</artifactId>
-        <version>${spring.version}</version>
-        <scope>test</scope>
-      </dependency>
-      <dependency>
         <groupId>org.mockito</groupId>
         <artifactId>mockito-core</artifactId>
         <version>${mockito.version}</version>
diff --git a/sra/pom.xml b/sra/pom.xml
index 97753e0..9c78820 100644
--- a/sra/pom.xml
+++ b/sra/pom.xml
@@ -74,32 +74,6 @@ under the License.
     </dependency>
 
     <dependency>
-      <groupId>org.springframework.security</groupId>
-      <artifactId>spring-security-crypto</artifactId>
-      <version>${spring-security.version}</version>      
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.security</groupId>
-      <artifactId>spring-security-oauth2-client</artifactId>
-      <version>${spring-security.version}</version>      
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.security</groupId>
-      <artifactId>spring-security-oauth2-core</artifactId>
-      <version>${spring-security.version}</version>      
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.security</groupId>
-      <artifactId>spring-security-oauth2-jose</artifactId>
-      <version>${spring-security.version}</version>      
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.security</groupId>
-      <artifactId>spring-security-oauth2-resource-server</artifactId>
-      <version>${spring-security.version}</version>      
-    </dependency>
-
-    <dependency>
       <groupId>org.pac4j</groupId>
       <artifactId>pac4j-saml</artifactId>
     </dependency>
diff --git a/sra/src/test/java/org/apache/syncope/sra/ActuatorTest.java b/sra/src/test/java/org/apache/syncope/sra/ActuatorTest.java
index 72a8432..f38e0de 100644
--- a/sra/src/test/java/org/apache/syncope/sra/ActuatorTest.java
+++ b/sra/src/test/java/org/apache/syncope/sra/ActuatorTest.java
@@ -21,7 +21,7 @@ package org.apache.syncope.sra;
 import javax.net.ssl.SSLException;
 import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.actuate.endpoint.http.ActuatorMediaType;
+import org.springframework.boot.actuate.endpoint.ApiVersion;
 import org.springframework.http.HttpHeaders;
 import org.springframework.test.web.reactive.server.WebTestClient;
 
@@ -39,7 +39,7 @@ public class ActuatorTest extends AbstractTest {
                 header(HttpHeaders.AUTHORIZATION, basicAuthHeader()).
                 exchange().
                 expectStatus().isOk().
-                expectHeader().valueEquals(HttpHeaders.CONTENT_TYPE, ActuatorMediaType.V3_JSON);
+                expectHeader().valueEquals(HttpHeaders.CONTENT_TYPE, ApiVersion.V3.getProducedMimeType().toString());
     }
 
     @Test
diff --git a/wa/starter/src/test/java/org/apache/syncope/wa/starter/AbstractTest.java b/wa/starter/src/test/java/org/apache/syncope/wa/starter/AbstractTest.java
index 7c4b798..f3c94cd 100644
--- a/wa/starter/src/test/java/org/apache/syncope/wa/starter/AbstractTest.java
+++ b/wa/starter/src/test/java/org/apache/syncope/wa/starter/AbstractTest.java
@@ -27,7 +27,7 @@ import org.springframework.context.annotation.ComponentScan;
 import org.springframework.test.context.ContextConfiguration;
 
 @SpringBootTest(
-        classes = AbstractTest.SyncopeTestConfiguration.class,
+        classes = { SyncopeWAApplication.class, AbstractTest.SyncopeTestConfiguration.class },
         webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
         properties = {
             "cas.authn.accept.users=mrossi::password",