1. Build.gradle에 의존성 추가하기
dependencies{
implementation group: 'org.postgresql', name: 'postgresql', version: '42.5.0'
runtimeOnly 'org.postgresql:postgresql'
}
2. application.properties에 db 관련 설정 추가하기
spring.datasource.url=DB주소
spring.datasource.username=계정 username
spring.datasource.password=비밀번호
spring.jpa.properties.hibernate.format_sql=true
spring.jpa.properties.hibernate.show_sql=true
spring.jpa.properties.logging.level.org.hibernate.SQL=debug
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect