spring boot 프로젝트와 연동할 postgreSQL 계정과 DB를 만들어두어야 한다.
테이블은 jpa가 만들어줄것임.
😊
runtimeOnly 'org.postgresql:postgresql'
spring.datasource 값을 입력해준다.
spring:
datasource:
url: jdbc:postgresql://localhost:5432/board
username: postgre
password: sdfhaklsdhfkljhfjkfhhvbjhsgkuyilaweukasdkhjjkad
driver-class-name
속성은
spring boot가
datasource.url의 값을 해석하여 알아서 설정해주기 때문에
지정해주지 않아도 된다.
spring boot 서비스를 실행시켜보면
테이블이 생성된 것과
postgreSQL dialect 로그가 출력된 것을 확인할 수 있다.