티스토리 뷰

728x90

User entity를 만든 후 UserRepository를 생성했습니다. 

아래 코드에서 보는 것처럼, 

UserRepository는 class가 아니라 interface입니다.

 

Repository는 CRUD를 할 수 있는 환경을 제공해 줍니다.

 

package com.lion.demo.repository;

import com.lion.demo.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;

public interface UserRepository extends JpaRepository<User, String> {

}
728x90
250x250
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2026/06   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함