JPA를 선택한 이유?


JPA 다중 DB 연결 과정


application.properties(기존)

spring.jpa.hibernate.ddl-auto=create
		# DB가 하나일 때에는 JPA 자체의 ddl-auto 설정을 해주면 됨
spring.jpa.show-sql=true

#-----------------------------------------------------------------------
# DB의 datasource가 하나뿐이므로 명명할 필요 없음

spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/cafe?useUniCode=yes&characterEncoding=UTF-8&serverTimezone=Asia/Seoul
spring.datasource.username=cafe
spring.datasource.password=cafe

다중 DB application.properties를 보기 전에 알아둘 것!!

Hibernate

Dialect(방언)