hanker
Spring boot - application.properties Oracle DB 설정 (properties/yml) 본문
SPRING
Spring boot - application.properties Oracle DB 설정 (properties/yml)
hanker 2024. 10. 10. 19:09pom.xml
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>19.8.0.0</version>
</dependency>
1. application.properties 일 경우
# IP:PORT:SID
spring.datasource.url=jdbc:oracle:thin:@localhost:1521:orcl
# ID
spring.datasource.username=hanker
# PW
spring.datasource.password=hanker
spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
# HikariCP 커넥션 풀 설정 (기본값)
spring.datasource.hikari.maximum-pool-size=10
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.Oracle12cDialect
2. application.yml 일 경우
spring:
datasource:
url: jdbc:oracle:thin:@localhost:1521:orcl # IP:PORT:SID
username: hanker
password: hanker
driver-class-name: oracle.jdbc.OracleDriver
hikari:
maximum-pool-size: 10
jpa:
hibernate:
ddl-auto: update
properties:
hibernate:
dialect: org.hibernate.dialect.Oracle12cDialect
끝.
'SPRING' 카테고리의 다른 글
Spring - excel to csv 파일 변환 (한글 깨짐 문제 완벽 해결) (0) | 2024.10.06 |
---|---|
Spring Boot - 메서드 호출 전/후 로깅 (AOP) (0) | 2024.10.04 |
Spring boot - application.properties MSSQL DB 설정 (2) | 2024.09.29 |
Spring Boot - 스케쥴러 설정 방법 (0) | 2024.09.08 |
javax.persistence.TransactionRequiredException: Executing an update/delete query (0) | 2024.09.04 |