From 0554797999b0ed045f584451c41b031ca9e06ce7 Mon Sep 17 00:00:00 2001 From: Ekaterina Galkina Date: Wed, 10 Apr 2019 18:47:23 +0500 Subject: [PATCH] replace --- .../src/main/java/com/baeldung/entity}/Customer.java | 2 +- .../java/com/baeldung/repository}/CustomerRepository.java | 3 ++- .../repository}/CustomerRepositoryIntegrationTest.java | 8 +++----- 3 files changed, 6 insertions(+), 7 deletions(-) rename persistence-modules/{spring-data-jpa/src/main/java/com/baeldung/customer => spring-data-jpa-2/src/main/java/com/baeldung/entity}/Customer.java (95%) rename persistence-modules/{spring-data-jpa/src/main/java/com/baeldung/customer => spring-data-jpa-2/src/main/java/com/baeldung/repository}/CustomerRepository.java (89%) rename persistence-modules/{spring-data-jpa/src/test/java/com/baeldung/customer => spring-data-jpa-2/src/test/java/com/baeldung/repository}/CustomerRepositoryIntegrationTest.java (83%) diff --git a/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/customer/Customer.java b/persistence-modules/spring-data-jpa-2/src/main/java/com/baeldung/entity/Customer.java similarity index 95% rename from persistence-modules/spring-data-jpa/src/main/java/com/baeldung/customer/Customer.java rename to persistence-modules/spring-data-jpa-2/src/main/java/com/baeldung/entity/Customer.java index ed922c3075..efcae73853 100644 --- a/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/customer/Customer.java +++ b/persistence-modules/spring-data-jpa-2/src/main/java/com/baeldung/entity/Customer.java @@ -1,4 +1,4 @@ -package com.baeldung.customer; +package com.baeldung.entity; import javax.persistence.Entity; import javax.persistence.GeneratedValue; diff --git a/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/customer/CustomerRepository.java b/persistence-modules/spring-data-jpa-2/src/main/java/com/baeldung/repository/CustomerRepository.java similarity index 89% rename from persistence-modules/spring-data-jpa/src/main/java/com/baeldung/customer/CustomerRepository.java rename to persistence-modules/spring-data-jpa-2/src/main/java/com/baeldung/repository/CustomerRepository.java index c354ccbb58..65b22bbd84 100644 --- a/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/customer/CustomerRepository.java +++ b/persistence-modules/spring-data-jpa-2/src/main/java/com/baeldung/repository/CustomerRepository.java @@ -1,5 +1,6 @@ -package com.baeldung.customer; +package com.baeldung.repository; +import com.baeldung.entity.Customer; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; diff --git a/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/customer/CustomerRepositoryIntegrationTest.java b/persistence-modules/spring-data-jpa-2/src/test/java/com/baeldung/repository/CustomerRepositoryIntegrationTest.java similarity index 83% rename from persistence-modules/spring-data-jpa/src/test/java/com/baeldung/customer/CustomerRepositoryIntegrationTest.java rename to persistence-modules/spring-data-jpa-2/src/test/java/com/baeldung/repository/CustomerRepositoryIntegrationTest.java index c3bd821f52..5d6457ce30 100644 --- a/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/customer/CustomerRepositoryIntegrationTest.java +++ b/persistence-modules/spring-data-jpa-2/src/test/java/com/baeldung/repository/CustomerRepositoryIntegrationTest.java @@ -1,8 +1,6 @@ -package com.baeldung.customer; +package com.baeldung.repository; -import com.baeldung.config.PersistenceConfiguration; -import com.baeldung.config.PersistenceProductConfiguration; -import com.baeldung.config.PersistenceUserConfiguration; +import com.baeldung.entity.Customer; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -17,7 +15,7 @@ import java.util.List; import static org.junit.Assert.assertEquals; -@DataJpaTest(excludeAutoConfiguration = { PersistenceConfiguration.class, PersistenceUserConfiguration.class, PersistenceProductConfiguration.class }) +@DataJpaTest @RunWith(SpringRunner.class) public class CustomerRepositoryIntegrationTest {