3. jpa로 테이블 생성하기
·
프로젝트/블로그 제작(중단)
1.user entity package com.cos.blog.model; import org.hibernate.annotations.ColumnDefault; import org.hibernate.annotations.CreationTimestamp; import javax.persistence.*; import java.sql.Timestamp; @Entity//user 클래스가 MySQL에 테이블 생성이 된다 public class User { @Id //primary key @GeneratedValue(strategy = GenerationType.IDENTITY) // 프로젝트에서 연결된 db의 넘버링 전략을 따라간다. private int id; // 시퀀스,auto_increment @Col..