Skip to content

Latest commit

 

History

History
13 lines (9 loc) · 428 Bytes

File metadata and controls

13 lines (9 loc) · 428 Bytes

문제 상황

  • SpringBoot에서 JPA로 데이터베이스에 접근
  • 아무 설정 없이 실행할 경우 → H2 쿼리가 적용됨 ⇒ MySQL 쿼리가 적용되도록 하기 위함

해결 방법

  • application.properties에 아래 코드 추가
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL57Dialect
spring.datasource.hikari.jdbc-url=jdbc:h2:mem://localhost/~/testdb;MODE=MYSQL