본문 바로가기

백앤드/Java

[JAVA] SpringBoot JPA Properties 속성 설정

반응형

이번 포스팅은 또 검색하기 귀찮아서 필자가 나중에 써먹을려고 남겨놓는 포스팅입니다.

 

1. PostgreSQL 설정 값 

schema.name=test_schema

spring.datasource.url=jdbc:postgresql://localhost:5432/sf1-manager?useUnicode=true&characterEncoding=utf8&currentSchema=${schema.name}
spring.datasource.username=postgres
spring.datasource.password=1234
spring.datasource.driver-class-name=org.postgresql.Driver
spring.jpa.hibernate.dialect=org.hibernate.dialect.PostgreSQL10Dialect

 

2. MySQL 설정 값

database.name=test_db

spring.datasource.url=jdbc:mysql://localhost:3306/${database.name}?servertimezone=asia/seoul&useUnicode=true&characterEncoding=UTF-8
spring.datasource.username=root
spring.datasource.password=1234
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.jpa.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect

 

3. Oracle 설정 값

spring.datasource.url=jdbc:oracle:thin:@localhost:1521/xe?useUnicode=true&characterEncoding=utf8
spring.datasource.username=admin
spring.datasource.password=1234
spring.jpa.hibernate.dialect=org.hibernate.dialect.Oracle12cDialect
spring.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver

 

4. MsSQL 설정 값

database.name=test_db

spring.datasource.url=jdbc:sqlserver://localhost:1433;DatabaseName=${database.name};encrypt=false;CharacterSet=UTF-8
spring.datasource.username=admin
spring.datasource.password=1234
spring.jpa.hibernate.dialect=org.hibernate.dialect.SQLServer2012Dialect
spring.datasource.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver

 

5. Tibero 설정 값

databse.name=tibero

spring.datasource.url=jdbc:tibero:thin:@61.82.137.78:8629:${schema.name}
spring.datasource.username=admin
spring.datasource.password=1234
spring.jpa.hibernate.dialect=org.hibernate.dialect.Tibero10gDialect
spring.datasource.driver-class-name=com.tmax.tibero.jdbc.TbDriver
반응형