Unable to determine Dialect without JDBC metadata (please set 'javax.persistence.jdbc.url', 'hibernate.connection.url', or 'hibernate.dialect'
스프링부트에서 DB연결시 이와 같은 문구(org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] due to: Unable to determine Dialect without JDBC metadata (please set 'javax.persistence.jdbc.url', 'hibernate.connection.url', or 'hibernate.dialect')) 가 나와 해결하였다.
아래는 퍼온 내용.
Spring Boot 컨테이너에서 MySQL Dialect 설정을 찾지 못 해서 에러가 생긴 것이다.
Hibernate는 고유한 SQL 문법 및 동작을 가진다.
따라서, 특정 DB를 사용하는 경우에 특정한 설정을 해줄 필요가 있다.
Dialect는 Hibernate가 생성하는 SQL 문을 특정 DB 시스템에 맞게 조정하는 역할을 한다.
해결법
application.properties 에 아래의 코드를 추가했다.
spring.jpa.properties.hibernate.dialect= org.hibernate.dialect.MySQLDialect