Entity2 맛슐랭 - 엔티티 등록 이전에 설계한 ERD를 토대로 엔티티를 구현했다. 1. Member 네이버나 카카오에서 닉네임을 변경하였을 경우 간편 로그인 시 동일하게 변경이 이루어지도록 하기 위해 update함수를 만들었다. 사용자의 권한을 확인하기 위해 getRoleKey함수도 만들었다. Role을 String 타입으로 db에 저장하기 위해 Enumtype.STRING을 명시했다. @Entity @Getter @NoArgsConstructor public class Member { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String email; private String nickname; @Enumerated(EnumType... 2024. 3. 27. 쇼핑몰 구현 6 - 라이브러리 설치, Entity 생성 1. 프로젝트에 사용할 라이브러리 설치 (build.gradle) dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' implementation 'org.springframework.boot:spring-boot-starter-validation' implementation 'org.springframework.boot:spring-boot-starter-web' //security implementation 'org.thymeleaf.extras:thymeleaf-extras.. 2024. 2. 23. 이전 1 다음