목록ORM/JPA (8)
개발자의 오르막
인터페이스를 정의할 때 2가지 경우가 있다. 1) JpaRepository의 메소드만을 사용하는 인터페이스를 만들 것이냐, 2) 아님 인터페이스 자체를 커스터마이징 할 것이냐 이번 시간은 독자적인 인터페이스를 만들고 싶을 때 어떻게 하는지 알아보겠다. # 독자적인 인터페이스를 정의 @RepositoryDefinition(domainClass = Comment.class, idClass = Long.class) public interface CommentRepository { Comment save(Comment comment); List findAll(); } 위의 예시와 같이 JpaRepository를 상속받지 않는 독자적인 인터페이스를 생성한 후 Test도 구성해준다. @RunWith(SpringRu..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/bD7516/btqywbaigEI/9JmeOSJVn2RIbRKw45uGLk/img.png)
# 스프링데이터 Reference - https://spring.io/projects/spring-data Spring Projects The Spring portfolio has many projects, including Spring Framework, Spring IO Platform, Spring Cloud, Spring Boot, Spring Data, Spring Security... spring.io # 스프링 데이터 구성 - 스프링 데이터 : SQL & NoSQL 저장소 지원 프로젝트의 묶음을 의미 - 스프링 데이터 common : 여러 저장소 지원 프로젝트의 공통 기능 제공 (Repository, Bean 등의 공통 기능 제공) - 스프링 데이터 REST : 저장소의 데이터를 하이퍼 미디..