본문 바로가기
데이터베이스

[JPA] "dialect postgres is not supported" error 해결

by You_mool 2024. 9. 9.
반응형

운영체제 : Windows 11
IDE : IntelliJ(2024.1.4)
언어 : Java
프레임워크 : Spring(3.2.5)
DB : PostgreSQL(with JPA)

대부분 JPA를 설치하면 hibernate가 알아서 dialect를 설정한다. 하지만 가끔 "dialect postgres is not supported" 에러가 나오면 서버가 실행이 안될 때가 있다.

그때는 application.yml 파일에 직접 dialect를 사용하겠다고 선언해주면 된다.(일시적인 해결책)
!!!!!!!추가해주면 서버가 실행은 되지만 굳이 dialect 선언 안해줘도 된다는 warning 메시지를 뱉는다.....
인텔리제이 캐시 삭제 후 IDE 재시작이나 컴퓨터 재시작으로 해결했는데 끄기 싫다면 

jpa 설정 부분에 dialect를 추가해주면 된다.

spring:
  config:
    activate:
      on-profile: local
  datasource:
    url: jdbc:postgresql://localhost:5432/test
    username: postgres
    password: 1234
  jpa:
    properties:
      hibernate:
        dialect: org.hibernate.dialect.PostgreSQLDialect
반응형