[Spring, JPA] 다중 DB 연결, Caused by: org.hibernate.HibernateException: Unable to determine Dialect without JDBC metadata (please set 'javax.persistence.jdbc.url', 'hibernate.connection.url', or 'hibernate.dialect')

19·2024년 3월 5일
0

에러 모음

목록 보기
18/24

배경

기존 프로젝트에 추가로 DB를 연결해야 하는 일이 생겼다.
yml에 DataSource 관련 정보를 추가했는데, 자꾸 에러가 발생했다
왜 자꾸 JDBC 어쩌고를 찾는거니


내가 한 방법

yml에서 datasource의 url을 jdbc-url로 바꾸니까 해결이 되었다


기존)

spring:
  first-datasource:
    driver-class-name: ...
    username: ...
    url: ...
  second-datasource:
    driver-class-name: ...
    username: ...
    url: ...

변경)

spring:
  first-datasource:
    driver-class-name: ...
    username: ...
    jdbc-url: ...
  second-datasource:
    driver-class-name: ...
    username: ...
    jdbc-url: ...

참고

https://velog.io/@nimoh/Error-jdbcUrl-is-required-with-driverClassName

profile
하나씩 차근차근

0개의 댓글