테이블, 컬럼명 생성 전략 스프링 부트에서 하이버네이트 기본 매핑 전략을 변경해서 실제 테이블 필드명은 다름 https://docs.spring.io/spring-boot/docs/2.1.3.RELEASE/reference/htmlsingle/#howto- configure-hibernate-naming-strategy http://docs.jboss.org/hibernate/orm/5.4/userguide/html_single/Hibernate_User_Guide.html#naming 하이버네이트 기존 구현: 엔티티의 필드명을 그대로 테이블의 컬럼명으로 사용 ( `SpringPhysicalNamingStrategy` ) 스프링 부트 신규 설정 (엔티티(필드) 테이블(컬럼)) 카멜 케이스 언더스코어(me..
1)실무에서는 `@ManyToMany` 를 사용하지 말자 `@ManyToMany` 는 편리한 것 같지만, 중간 테이블( `CATEGORY_ITEM` )에 컬럼을 추가할 수 없고, 세밀하게 쿼리 를 실행하기 어렵기 때문에 실무에서 사용하기에는 한계가 있다. 중간 엔티티( `CategoryItem` 를 만들고 `@ManyToOne` , `@OneToMany` 로 매핑해서 사용하자. 정리하면 다대다 매핑을 일대다, 다대일 매핑으로 풀어내 서 사용하자. package jpabook2.jpashop2.domain; import jakarta.persistence.Embeddable; import lombok.Getter; @Embeddable //jpa 내장타입 @Getter public class Address..

먼저 properties가 아닌 yml 파일을 사용한다. spring: #띄어쓰기 없음 datasource: #띄어쓰기 2칸 url: jdbc:h2:tcp://localhost/~/jpashop #4칸 username: sa password: driver-class-name: org.h2.Driver jpa: #띄어쓰기 2칸 hibernate: #띄어쓰기 4칸 ddl-auto: create #띄어쓰기 6칸 properties: #띄어쓰기 4칸 hibernate: #띄어쓰기 6칸 #show_sql: true #띄어쓰기 8칸 format_sql: true #띄어쓰기 8칸 logging.level: #띄어쓰기 없음 org.hibernate.SQL: debug #띄어쓰기 2칸 org.hibernate.type:..
View 환경 설정 **thymeleaf 템플릿 엔진** thymeleaf 공식 사이트: https://www.thymeleaf.org/ 스프링 공식 튜토리얼: https://spring.io/guides/gs/serving-web-content/ 스프링부트 메뉴얼: https://docs.spring.io/spring-boot/docs/2.1.6.RELEASE/reference/html/ boot-features-developing-web-applications.html#boot-features-spring-mvc-template-engines 스프링 부트 thymeleaf viewName 매핑 `resources:templates/` +{ViewName}+ `.html` index는 static안에 ..
스프링 부트 라이브러리 살펴보기** - spring-boot-starter-web - spring-boot-starter-tomcat: 톰캣 (웹서버) - spring-webmvc: 스프링 웹 MVC - spring-boot-starter-thymeleaf: 타임리프 템플릿 엔진(View) - spring-boot-starter-data-jpa - spring-boot-starter-aop - spring-boot-starter-jdbc - HikariCP 커넥션 풀 (부트 2.0 기본) - hibernate + JPA: 하이버네이트 + JPA - spring-data-jpa: 스프링 데이터 JPA - spring-boot-starter(공통): 스프링 부트 + 스프링 코어 + 로깅 - spring-bo..
- Total
- Today
- Yesterday
- exception
- HTTP
- Java
- SpringBoot
- reject
- Intercepter
- hypertexttransferprotocol
- 컨트
- BindingResult
- 백엔드 개발자 공부
- react실행
- rejectValue
- 리터럴
- 항해99
- filter
- 항해플러스
- 인터셉터
- JPA
- React
- 로그인
- ArgumentResolver
- 향해플러스백엔드
- thymleaf
- 스프링공부
- 향해플러스
- 예외처리
- 향해99
- 백엔드 개발자 역량
- jpa api
- 스프링부트
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |