From 2fa275119ce57a3f3319445d9e67fa9c615b0b1c Mon Sep 17 00:00:00 2001 From: dupirefr Date: Thu, 19 Mar 2020 20:48:49 +0100 Subject: [PATCH] [JAVA-961] Standardize packages in spring-security-modules: spring-security-acl --- .../main/java/{org => com}/baeldung/acl/Application.java | 2 +- .../java/{org => com}/baeldung/acl/config/ACLContext.java | 2 +- .../acl/config/AclMethodSecurityConfiguration.java | 2 +- .../baeldung/acl/config/JPAPersistenceConfig.java | 8 ++++---- .../acl/persistence/dao/NoticeMessageRepository.java | 4 ++-- .../baeldung/acl/persistence/entity/NoticeMessage.java | 2 +- .../spring-security-acl/src/main/resources/acl-data.sql | 2 +- ....properties => com.baeldung.acl.datasource.properties} | 0 .../baeldung/acl/SpringACLIntegrationTest.java | 8 ++++---- .../src/test/java/org/baeldung/SpringContextTest.java | 2 +- 10 files changed, 16 insertions(+), 16 deletions(-) rename spring-security-modules/spring-security-acl/src/main/java/{org => com}/baeldung/acl/Application.java (91%) rename spring-security-modules/spring-security-acl/src/main/java/{org => com}/baeldung/acl/config/ACLContext.java (99%) rename spring-security-modules/spring-security-acl/src/main/java/{org => com}/baeldung/acl/config/AclMethodSecurityConfiguration.java (96%) rename spring-security-modules/spring-security-acl/src/main/java/{org => com}/baeldung/acl/config/JPAPersistenceConfig.java (66%) rename spring-security-modules/spring-security-acl/src/main/java/{org => com}/baeldung/acl/persistence/dao/NoticeMessageRepository.java (88%) rename spring-security-modules/spring-security-acl/src/main/java/{org => com}/baeldung/acl/persistence/entity/NoticeMessage.java (92%) rename spring-security-modules/spring-security-acl/src/main/resources/{org.baeldung.acl.datasource.properties => com.baeldung.acl.datasource.properties} (100%) rename spring-security-modules/spring-security-acl/src/test/java/{org => com}/baeldung/acl/SpringACLIntegrationTest.java (96%) diff --git a/spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/Application.java b/spring-security-modules/spring-security-acl/src/main/java/com/baeldung/acl/Application.java similarity index 91% rename from spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/Application.java rename to spring-security-modules/spring-security-acl/src/main/java/com/baeldung/acl/Application.java index 665ca64076..b18a3a6527 100644 --- a/spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/Application.java +++ b/spring-security-modules/spring-security-acl/src/main/java/com/baeldung/acl/Application.java @@ -1,4 +1,4 @@ -package org.baeldung.acl; +package com.baeldung.acl; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/config/ACLContext.java b/spring-security-modules/spring-security-acl/src/main/java/com/baeldung/acl/config/ACLContext.java similarity index 99% rename from spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/config/ACLContext.java rename to spring-security-modules/spring-security-acl/src/main/java/com/baeldung/acl/config/ACLContext.java index 337e745c3c..cb60ef1d45 100644 --- a/spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/config/ACLContext.java +++ b/spring-security-modules/spring-security-acl/src/main/java/com/baeldung/acl/config/ACLContext.java @@ -1,4 +1,4 @@ -package org.baeldung.acl.config; +package com.baeldung.acl.config; import javax.sql.DataSource; diff --git a/spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/config/AclMethodSecurityConfiguration.java b/spring-security-modules/spring-security-acl/src/main/java/com/baeldung/acl/config/AclMethodSecurityConfiguration.java similarity index 96% rename from spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/config/AclMethodSecurityConfiguration.java rename to spring-security-modules/spring-security-acl/src/main/java/com/baeldung/acl/config/AclMethodSecurityConfiguration.java index e503cb1a41..1a8788b906 100644 --- a/spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/config/AclMethodSecurityConfiguration.java +++ b/spring-security-modules/spring-security-acl/src/main/java/com/baeldung/acl/config/AclMethodSecurityConfiguration.java @@ -1,4 +1,4 @@ -package org.baeldung.acl.config; +package com.baeldung.acl.config; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; diff --git a/spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/config/JPAPersistenceConfig.java b/spring-security-modules/spring-security-acl/src/main/java/com/baeldung/acl/config/JPAPersistenceConfig.java similarity index 66% rename from spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/config/JPAPersistenceConfig.java rename to spring-security-modules/spring-security-acl/src/main/java/com/baeldung/acl/config/JPAPersistenceConfig.java index 24d170e56c..5f7fff5ff3 100644 --- a/spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/config/JPAPersistenceConfig.java +++ b/spring-security-modules/spring-security-acl/src/main/java/com/baeldung/acl/config/JPAPersistenceConfig.java @@ -1,4 +1,4 @@ -package org.baeldung.acl.config; +package com.baeldung.acl.config; import org.springframework.boot.autoconfigure.domain.EntityScan; import org.springframework.context.annotation.Configuration; @@ -8,9 +8,9 @@ import org.springframework.transaction.annotation.EnableTransactionManagement; @Configuration @EnableTransactionManagement -@EnableJpaRepositories(basePackages = "org.baeldung.acl.persistence.dao") -@PropertySource("classpath:org.baeldung.acl.datasource.properties") -@EntityScan(basePackages={ "org.baeldung.acl.persistence.entity" }) +@EnableJpaRepositories(basePackages = "com.baeldung.acl.persistence.dao") +@PropertySource("classpath:com.baeldung.acl.datasource.properties") +@EntityScan(basePackages={ "com.baeldung.acl.persistence.entity" }) public class JPAPersistenceConfig { } diff --git a/spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/persistence/dao/NoticeMessageRepository.java b/spring-security-modules/spring-security-acl/src/main/java/com/baeldung/acl/persistence/dao/NoticeMessageRepository.java similarity index 88% rename from spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/persistence/dao/NoticeMessageRepository.java rename to spring-security-modules/spring-security-acl/src/main/java/com/baeldung/acl/persistence/dao/NoticeMessageRepository.java index 91a2af7d83..be1a0118fc 100644 --- a/spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/persistence/dao/NoticeMessageRepository.java +++ b/spring-security-modules/spring-security-acl/src/main/java/com/baeldung/acl/persistence/dao/NoticeMessageRepository.java @@ -1,8 +1,8 @@ -package org.baeldung.acl.persistence.dao; +package com.baeldung.acl.persistence.dao; import java.util.List; -import org.baeldung.acl.persistence.entity.NoticeMessage; +import com.baeldung.acl.persistence.entity.NoticeMessage; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.repository.query.Param; import org.springframework.security.access.prepost.PostAuthorize; diff --git a/spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/persistence/entity/NoticeMessage.java b/spring-security-modules/spring-security-acl/src/main/java/com/baeldung/acl/persistence/entity/NoticeMessage.java similarity index 92% rename from spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/persistence/entity/NoticeMessage.java rename to spring-security-modules/spring-security-acl/src/main/java/com/baeldung/acl/persistence/entity/NoticeMessage.java index bd1e866f83..80c04146e4 100644 --- a/spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/persistence/entity/NoticeMessage.java +++ b/spring-security-modules/spring-security-acl/src/main/java/com/baeldung/acl/persistence/entity/NoticeMessage.java @@ -1,4 +1,4 @@ -package org.baeldung.acl.persistence.entity; +package com.baeldung.acl.persistence.entity; import javax.persistence.Column; import javax.persistence.Entity; diff --git a/spring-security-modules/spring-security-acl/src/main/resources/acl-data.sql b/spring-security-modules/spring-security-acl/src/main/resources/acl-data.sql index a4e0011834..3b48c83f3c 100644 --- a/spring-security-modules/spring-security-acl/src/main/resources/acl-data.sql +++ b/spring-security-modules/spring-security-acl/src/main/resources/acl-data.sql @@ -4,7 +4,7 @@ INSERT INTO acl_sid (id, principal, sid) VALUES (3, 0, 'ROLE_EDITOR'); INSERT INTO acl_class (id, class) VALUES -(1, 'org.baeldung.acl.persistence.entity.NoticeMessage'); +(1, 'com.baeldung.acl.persistence.entity.NoticeMessage'); INSERT INTO system_message(id,content) VALUES (1,'First Level Message'), diff --git a/spring-security-modules/spring-security-acl/src/main/resources/org.baeldung.acl.datasource.properties b/spring-security-modules/spring-security-acl/src/main/resources/com.baeldung.acl.datasource.properties similarity index 100% rename from spring-security-modules/spring-security-acl/src/main/resources/org.baeldung.acl.datasource.properties rename to spring-security-modules/spring-security-acl/src/main/resources/com.baeldung.acl.datasource.properties diff --git a/spring-security-modules/spring-security-acl/src/test/java/org/baeldung/acl/SpringACLIntegrationTest.java b/spring-security-modules/spring-security-acl/src/test/java/com/baeldung/acl/SpringACLIntegrationTest.java similarity index 96% rename from spring-security-modules/spring-security-acl/src/test/java/org/baeldung/acl/SpringACLIntegrationTest.java rename to spring-security-modules/spring-security-acl/src/test/java/com/baeldung/acl/SpringACLIntegrationTest.java index 1460d4f47b..dfdeafe059 100644 --- a/spring-security-modules/spring-security-acl/src/test/java/org/baeldung/acl/SpringACLIntegrationTest.java +++ b/spring-security-modules/spring-security-acl/src/test/java/com/baeldung/acl/SpringACLIntegrationTest.java @@ -1,12 +1,12 @@ -package org.baeldung.acl; +package com.baeldung.acl; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import java.util.List; -import org.baeldung.acl.persistence.dao.NoticeMessageRepository; -import org.baeldung.acl.persistence.entity.NoticeMessage; +import com.baeldung.acl.persistence.dao.NoticeMessageRepository; +import com.baeldung.acl.persistence.entity.NoticeMessage; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; @@ -39,7 +39,7 @@ public class SpringACLIntegrationTest extends AbstractJUnit4SpringContextTests{ private static String EDITTED_CONTENT = "EDITED"; @Configuration - @ComponentScan("org.baeldung.acl.*") + @ComponentScan("com.baeldung.acl.*") public static class SpringConfig { } diff --git a/spring-security-modules/spring-security-acl/src/test/java/org/baeldung/SpringContextTest.java b/spring-security-modules/spring-security-acl/src/test/java/org/baeldung/SpringContextTest.java index 74f26e2e5a..6ecc431ddd 100644 --- a/spring-security-modules/spring-security-acl/src/test/java/org/baeldung/SpringContextTest.java +++ b/spring-security-modules/spring-security-acl/src/test/java/org/baeldung/SpringContextTest.java @@ -1,6 +1,6 @@ package org.baeldung; -import org.baeldung.acl.Application; +import com.baeldung.acl.Application; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest;