build도구 : gradle
hibernate사용할때 DB를 postgresql로 사용하고싶다 하면,
build.gradle 파일에 dependency에 postgresql 의존성을 추가해준다.
runtimeOnly 'org.postgresql:postgresql'
dependencies{
runtimeOnly 'org.postgresql:postgresql'
}
#SET database (postgresql)
spring.datasource.driverClassName=org.postgresql.Driver
spring.datasource.url=jdbc:postgresql:도메인주소:포트번호/db
spring.datasource.username=username
spring.datasource.password=password
#The SQL dialect makes Hibernate generate better SQL for the chosen database
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
spring.jpa.properties.hibernate.default_schema = 선택할스키마이름