jpa 예제 (1) 썸네일형 리스트형 [JPA] Part.02_Hibernate를 활용한 JPA 사용(CRUD 연습) 사전 세팅 아래와 같이 3개의 파일을 생성한다. 파일 명칭은 본인이 컨트롤하는 테이블 명칭에 빗대어 작성해본다. - Product.java : DB에 테이블과 매칭되는 클래스. Entity를 생성한다. - ProductRepository.java : DB Layer에 접근하는 인터페이스 - ProductController.java : DB를 브라우저에서 요청하여 호출할 수 있도록 해주는 컨트롤러 Product.java package com.example.test.domain; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persisten.. 이전 1 다음