From 6ae4a1aaf78e94078577ce0eaa4f4702e5c0b075 Mon Sep 17 00:00:00 2001 From: sampadawagde Date: Wed, 6 Jul 2022 15:25:12 +0530 Subject: [PATCH] JAVA-12732: move spring-ldap into spring-security-ldap --- spring-security-modules/pom.xml | 1 - .../spring-ldap/.gitignore | 13 -- spring-security-modules/spring-ldap/README.md | 8 - spring-security-modules/spring-ldap/pom.xml | 141 ------------------ .../src/main/resources/application.properties | 6 - .../src/main/resources/logback.xml | 19 --- .../java/org/baeldung/SpringContextTest.java | 17 --- .../spring-security-ldap/README.md | 2 + .../spring-security-ldap/pom.xml | 21 +++ .../com/baeldung/ldap/client/LdapClient.java | 0 .../baeldung/ldap/data/repository/User.java | 0 .../ldap/data/repository/UserRepository.java | 0 .../ldap/data/service/LdapClient.java | 0 .../ldap/data/service/UserService.java | 0 .../baeldung/ldap/javaconfig/AppConfig.java | 0 .../src/main/resources/application.properties | 9 +- .../ldap/client/LdapClientLiveTest.java | 0 .../LdapDataRepositoryIntegrationTest.java | 0 .../baeldung/ldap/javaconfig/TestConfig.java | 0 .../src/test/resources/test.ldif | 0 .../resources/test_application.properties | 0 21 files changed, 31 insertions(+), 206 deletions(-) delete mode 100644 spring-security-modules/spring-ldap/.gitignore delete mode 100644 spring-security-modules/spring-ldap/README.md delete mode 100644 spring-security-modules/spring-ldap/pom.xml delete mode 100644 spring-security-modules/spring-ldap/src/main/resources/application.properties delete mode 100644 spring-security-modules/spring-ldap/src/main/resources/logback.xml delete mode 100644 spring-security-modules/spring-ldap/src/test/java/org/baeldung/SpringContextTest.java rename spring-security-modules/{spring-ldap => spring-security-ldap}/src/main/java/com/baeldung/ldap/client/LdapClient.java (100%) rename spring-security-modules/{spring-ldap => spring-security-ldap}/src/main/java/com/baeldung/ldap/data/repository/User.java (100%) rename spring-security-modules/{spring-ldap => spring-security-ldap}/src/main/java/com/baeldung/ldap/data/repository/UserRepository.java (100%) rename spring-security-modules/{spring-ldap => spring-security-ldap}/src/main/java/com/baeldung/ldap/data/service/LdapClient.java (100%) rename spring-security-modules/{spring-ldap => spring-security-ldap}/src/main/java/com/baeldung/ldap/data/service/UserService.java (100%) rename spring-security-modules/{spring-ldap => spring-security-ldap}/src/main/java/com/baeldung/ldap/javaconfig/AppConfig.java (100%) rename spring-security-modules/{spring-ldap => spring-security-ldap}/src/test/java/com/baeldung/ldap/client/LdapClientLiveTest.java (100%) rename spring-security-modules/{spring-ldap => spring-security-ldap}/src/test/java/com/baeldung/ldap/client/LdapDataRepositoryIntegrationTest.java (100%) rename spring-security-modules/{spring-ldap => spring-security-ldap}/src/test/java/com/baeldung/ldap/javaconfig/TestConfig.java (100%) rename spring-security-modules/{spring-ldap => spring-security-ldap}/src/test/resources/test.ldif (100%) rename spring-security-modules/{spring-ldap => spring-security-ldap}/src/test/resources/test_application.properties (100%) diff --git a/spring-security-modules/pom.xml b/spring-security-modules/pom.xml index 2123c03016..c82614a3af 100644 --- a/spring-security-modules/pom.xml +++ b/spring-security-modules/pom.xml @@ -16,7 +16,6 @@ spring-5-security - spring-ldap spring-security-acl spring-security-auth0 spring-security-cognito diff --git a/spring-security-modules/spring-ldap/.gitignore b/spring-security-modules/spring-ldap/.gitignore deleted file mode 100644 index 83c05e60c8..0000000000 --- a/spring-security-modules/spring-ldap/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -*.class - -#folders# -/target -/neoDb* -/data -/src/main/webapp/WEB-INF/classes -*/META-INF/* - -# Packaged files # -*.jar -*.war -*.ear \ No newline at end of file diff --git a/spring-security-modules/spring-ldap/README.md b/spring-security-modules/spring-ldap/README.md deleted file mode 100644 index 4872f897e1..0000000000 --- a/spring-security-modules/spring-ldap/README.md +++ /dev/null @@ -1,8 +0,0 @@ -## Spring LDAP - -This module contains articles about Spring LDAP - -### Relevant articles - -- [Spring LDAP Overview](https://www.baeldung.com/spring-ldap) -- [Guide to Spring Data LDAP](https://www.baeldung.com/spring-data-ldap) diff --git a/spring-security-modules/spring-ldap/pom.xml b/spring-security-modules/spring-ldap/pom.xml deleted file mode 100644 index 086be2df5a..0000000000 --- a/spring-security-modules/spring-ldap/pom.xml +++ /dev/null @@ -1,141 +0,0 @@ - - - 4.0.0 - spring-ldap - 0.1-SNAPSHOT - spring-ldap - jar - - - com.baeldung - spring-security-modules - 0.0.1-SNAPSHOT - - - - - org.springframework.ldap - spring-ldap-core - ${spring-ldap.version} - - - commons-logging - commons-logging - - - - - org.springframework - spring-context - ${spring-context.version} - - - - org.springframework.ldap - spring-ldap-test - ${spring-ldap.version} - test - - - commons-logging - commons-logging - - - - - - org.apache.directory.server - apacheds-core - ${apacheds.version} - test - - - org.apache.directory.server - apacheds-core-entry - ${apacheds.version} - test - - - org.apache.directory.server - apacheds-protocol-shared - ${apacheds.version} - test - - - org.apache.directory.server - apacheds-protocol-ldap - ${apacheds.version} - test - - - org.apache.directory.server - apacheds-server-jndi - ${apacheds.version} - test - - - org.apache.directory.shared - shared-ldap - ${shared-ldap.version} - test - - - - org.springframework.data - spring-data-ldap - ${spring-data-ldap.version} - - - org.springframework.data - spring-data-jpa - ${spring-data-jpa.version} - - - - - spring-ldap - - - - - live - - - - org.apache.maven.plugins - maven-surefire-plugin - - - integration-test - - test - - - - **/*IntegrationTest.java - **/*IntTest.java - - - **/*LiveTest.java - - - - - - - - - - - - 2.3.1.RELEASE - 4.3.6.RELEASE - 1.5.5 - 0.9.15 - 1.0.6.RELEASE - 1.11.6.RELEASE - - - \ No newline at end of file diff --git a/spring-security-modules/spring-ldap/src/main/resources/application.properties b/spring-security-modules/spring-ldap/src/main/resources/application.properties deleted file mode 100644 index 670fb79234..0000000000 --- a/spring-security-modules/spring-ldap/src/main/resources/application.properties +++ /dev/null @@ -1,6 +0,0 @@ -ldap.partitionSuffix=dc=example,dc=com -ldap.partition=example -ldap.principal=uid=admin,ou=system -ldap.password=secret -ldap.port=18889 -ldap.url=ldap://localhost:18889 \ No newline at end of file diff --git a/spring-security-modules/spring-ldap/src/main/resources/logback.xml b/spring-security-modules/spring-ldap/src/main/resources/logback.xml deleted file mode 100644 index 7bd5154680..0000000000 --- a/spring-security-modules/spring-ldap/src/main/resources/logback.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-security-modules/spring-ldap/src/test/java/org/baeldung/SpringContextTest.java b/spring-security-modules/spring-ldap/src/test/java/org/baeldung/SpringContextTest.java deleted file mode 100644 index 8f0c3d4612..0000000000 --- a/spring-security-modules/spring-ldap/src/test/java/org/baeldung/SpringContextTest.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.baeldung; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; - -import com.baeldung.ldap.javaconfig.AppConfig; - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration(classes = AppConfig.class) -public class SpringContextTest { - - @Test - public void whenSpringContextIsBootstrapped_thenNoExceptions() { - } -} diff --git a/spring-security-modules/spring-security-ldap/README.md b/spring-security-modules/spring-security-ldap/README.md index f75c1bbaef..d396d67f56 100644 --- a/spring-security-modules/spring-security-ldap/README.md +++ b/spring-security-modules/spring-security-ldap/README.md @@ -9,6 +9,8 @@ The "Learn Spring Security" Classes: http://github.learnspringsecurity.com ### Relevant Article: - [Intro to Spring Security LDAP](https://www.baeldung.com/spring-security-ldap) +- [Spring LDAP Overview](https://www.baeldung.com/spring-ldap) +- [Guide to Spring Data LDAP](https://www.baeldung.com/spring-data-ldap) ### Notes diff --git a/spring-security-modules/spring-security-ldap/pom.xml b/spring-security-modules/spring-security-ldap/pom.xml index 3755c33125..73b77184d1 100644 --- a/spring-security-modules/spring-security-ldap/pom.xml +++ b/spring-security-modules/spring-security-ldap/pom.xml @@ -44,6 +44,27 @@ apacheds-server-jndi ${apacheds.version} + + + org.springframework.data + spring-data-ldap + + + org.springframework.data + spring-data-jpa + + + + org.springframework.ldap + spring-ldap-test + test + + + commons-logging + commons-logging + + + diff --git a/spring-security-modules/spring-ldap/src/main/java/com/baeldung/ldap/client/LdapClient.java b/spring-security-modules/spring-security-ldap/src/main/java/com/baeldung/ldap/client/LdapClient.java similarity index 100% rename from spring-security-modules/spring-ldap/src/main/java/com/baeldung/ldap/client/LdapClient.java rename to spring-security-modules/spring-security-ldap/src/main/java/com/baeldung/ldap/client/LdapClient.java diff --git a/spring-security-modules/spring-ldap/src/main/java/com/baeldung/ldap/data/repository/User.java b/spring-security-modules/spring-security-ldap/src/main/java/com/baeldung/ldap/data/repository/User.java similarity index 100% rename from spring-security-modules/spring-ldap/src/main/java/com/baeldung/ldap/data/repository/User.java rename to spring-security-modules/spring-security-ldap/src/main/java/com/baeldung/ldap/data/repository/User.java diff --git a/spring-security-modules/spring-ldap/src/main/java/com/baeldung/ldap/data/repository/UserRepository.java b/spring-security-modules/spring-security-ldap/src/main/java/com/baeldung/ldap/data/repository/UserRepository.java similarity index 100% rename from spring-security-modules/spring-ldap/src/main/java/com/baeldung/ldap/data/repository/UserRepository.java rename to spring-security-modules/spring-security-ldap/src/main/java/com/baeldung/ldap/data/repository/UserRepository.java diff --git a/spring-security-modules/spring-ldap/src/main/java/com/baeldung/ldap/data/service/LdapClient.java b/spring-security-modules/spring-security-ldap/src/main/java/com/baeldung/ldap/data/service/LdapClient.java similarity index 100% rename from spring-security-modules/spring-ldap/src/main/java/com/baeldung/ldap/data/service/LdapClient.java rename to spring-security-modules/spring-security-ldap/src/main/java/com/baeldung/ldap/data/service/LdapClient.java diff --git a/spring-security-modules/spring-ldap/src/main/java/com/baeldung/ldap/data/service/UserService.java b/spring-security-modules/spring-security-ldap/src/main/java/com/baeldung/ldap/data/service/UserService.java similarity index 100% rename from spring-security-modules/spring-ldap/src/main/java/com/baeldung/ldap/data/service/UserService.java rename to spring-security-modules/spring-security-ldap/src/main/java/com/baeldung/ldap/data/service/UserService.java diff --git a/spring-security-modules/spring-ldap/src/main/java/com/baeldung/ldap/javaconfig/AppConfig.java b/spring-security-modules/spring-security-ldap/src/main/java/com/baeldung/ldap/javaconfig/AppConfig.java similarity index 100% rename from spring-security-modules/spring-ldap/src/main/java/com/baeldung/ldap/javaconfig/AppConfig.java rename to spring-security-modules/spring-security-ldap/src/main/java/com/baeldung/ldap/javaconfig/AppConfig.java diff --git a/spring-security-modules/spring-security-ldap/src/main/resources/application.properties b/spring-security-modules/spring-security-ldap/src/main/resources/application.properties index 3d0221bb7b..cbe57f420f 100644 --- a/spring-security-modules/spring-security-ldap/src/main/resources/application.properties +++ b/spring-security-modules/spring-security-ldap/src/main/resources/application.properties @@ -1 +1,8 @@ -management.health.ldap.enabled=false \ No newline at end of file +management.health.ldap.enabled=false + +ldap.partitionSuffix=dc=example,dc=com +ldap.partition=example +ldap.principal=uid=admin,ou=system +ldap.password=secret +ldap.port=18889 +ldap.url=ldap://localhost:18889 \ No newline at end of file diff --git a/spring-security-modules/spring-ldap/src/test/java/com/baeldung/ldap/client/LdapClientLiveTest.java b/spring-security-modules/spring-security-ldap/src/test/java/com/baeldung/ldap/client/LdapClientLiveTest.java similarity index 100% rename from spring-security-modules/spring-ldap/src/test/java/com/baeldung/ldap/client/LdapClientLiveTest.java rename to spring-security-modules/spring-security-ldap/src/test/java/com/baeldung/ldap/client/LdapClientLiveTest.java diff --git a/spring-security-modules/spring-ldap/src/test/java/com/baeldung/ldap/client/LdapDataRepositoryIntegrationTest.java b/spring-security-modules/spring-security-ldap/src/test/java/com/baeldung/ldap/client/LdapDataRepositoryIntegrationTest.java similarity index 100% rename from spring-security-modules/spring-ldap/src/test/java/com/baeldung/ldap/client/LdapDataRepositoryIntegrationTest.java rename to spring-security-modules/spring-security-ldap/src/test/java/com/baeldung/ldap/client/LdapDataRepositoryIntegrationTest.java diff --git a/spring-security-modules/spring-ldap/src/test/java/com/baeldung/ldap/javaconfig/TestConfig.java b/spring-security-modules/spring-security-ldap/src/test/java/com/baeldung/ldap/javaconfig/TestConfig.java similarity index 100% rename from spring-security-modules/spring-ldap/src/test/java/com/baeldung/ldap/javaconfig/TestConfig.java rename to spring-security-modules/spring-security-ldap/src/test/java/com/baeldung/ldap/javaconfig/TestConfig.java diff --git a/spring-security-modules/spring-ldap/src/test/resources/test.ldif b/spring-security-modules/spring-security-ldap/src/test/resources/test.ldif similarity index 100% rename from spring-security-modules/spring-ldap/src/test/resources/test.ldif rename to spring-security-modules/spring-security-ldap/src/test/resources/test.ldif diff --git a/spring-security-modules/spring-ldap/src/test/resources/test_application.properties b/spring-security-modules/spring-security-ldap/src/test/resources/test_application.properties similarity index 100% rename from spring-security-modules/spring-ldap/src/test/resources/test_application.properties rename to spring-security-modules/spring-security-ldap/src/test/resources/test_application.properties