728x90

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 = 선택할스키마이름
'BackEnd > Spring' 카테고리의 다른 글
[Spring] SpringBoot JSTL 사용하여 Controller 에서 ModelAndView를 이용하여 View로 넘겨주기 (0) | 2021.12.28 |
---|---|
[Spring] SpringBoot Path with "WEB-INF" or "META-INF" 오류 (0) | 2021.12.28 |
[JPA] Spring Data JPA 기초 (1) -Repository 종류 (0) | 2021.12.28 |
[Spring] lombok( 롬복의 특징, annotations) (0) | 2021.12.28 |
[JavaScript] Ajax에서 JSON으로 return 받은 값을 table에 insert하기(뿌려주기) (0) | 2021.12.12 |
댓글