Skip to content

Commit 14463ce

Browse files
committed
Reflect refactorings from Spring Data Commons.
1 parent 215528f commit 14463ce

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

spring-data-jpa-example/src/test/java/org/springframework/data/jpa/example/repository/AuditableUserSample.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import org.springframework.beans.factory.annotation.Autowired;
88
import org.springframework.data.jpa.example.auditing.AuditableUser;
99
import org.springframework.data.jpa.example.auditing.AuditorAwareImpl;
10-
import org.springframework.data.repository.Repository;
10+
import org.springframework.data.repository.CrudRepository;
1111
import org.springframework.test.context.ContextConfiguration;
1212
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
1313
import org.springframework.transaction.annotation.Transactional;
@@ -22,7 +22,7 @@
2222
public class AuditableUserSample {
2323

2424
@Autowired
25-
private Repository<AuditableUser, Long> repository;
25+
private CrudRepository<AuditableUser, Long> repository;
2626

2727
@Autowired
2828
private AuditorAwareImpl auditorAware;

spring-data-jpa-example/src/test/java/org/springframework/data/jpa/example/repository/BasicSample.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import org.junit.Test;
1212
import org.springframework.data.jpa.example.domain.User;
1313
import org.springframework.data.jpa.repository.support.SimpleJpaRepository;
14-
import org.springframework.data.repository.Repository;
14+
import org.springframework.data.repository.CrudRepository;
1515

1616

1717
/**
@@ -21,7 +21,7 @@
2121
*/
2222
public class BasicSample {
2323

24-
private Repository<User, Long> userRepository;
24+
private CrudRepository<User, Long> userRepository;
2525
private EntityManager em;
2626

2727

spring-data-jpa-showcase/src/main/java/org/springframework/data/jpa/showcase/after/AccountRepository.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,16 @@
22

33
import java.util.List;
44

5-
import org.springframework.data.jpa.repository.JpaRepository;
65
import org.springframework.data.jpa.showcase.core.Account;
76
import org.springframework.data.jpa.showcase.core.Customer;
8-
7+
import org.springframework.data.repository.CrudRepository;
98

109
/**
1110
* Repository to manage {@link Account} instances.
1211
*
1312
* @author Oliver Gierke
1413
*/
15-
public interface AccountRepository extends JpaRepository<Account, Long> {
14+
public interface AccountRepository extends CrudRepository<Account, Long> {
1615

1716
/**
1817
* Returns all accounts belonging to the given {@link Customer}.

spring-data-jpa-showcase/src/snippets/java/org/springframework/data/jpa/showcase/snippets/AccountRepository.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
import org.springframework.data.jpa.showcase.core.Account;
66
import org.springframework.data.jpa.showcase.core.Customer;
7-
import org.springframework.data.repository.Repository;
7+
import org.springframework.data.repository.CrudRepository;
88

99

1010
/**
1111
* Repository to manage {@link Account} instances.
1212
*
1313
* @author Oliver Gierke
1414
*/
15-
public interface AccountRepository extends Repository<Account, Long>, AccountRepositoryCustom {
15+
public interface AccountRepository extends CrudRepository<Account, Long>, AccountRepositoryCustom {
1616

1717
/**
1818
* Returns all accounts belonging to the given {@link Customer}.

0 commit comments

Comments
 (0)