Developer Sang Guy

[Spring Boot] DB 연결 본문

Spring

[Spring Boot] DB 연결

은크 2022. 9. 28. 10:31

-- application.properties

 

-- Oracle

spring.datasource.driver-class-name=oracle.jdbc.OracleDriver

spring.datasource.url=jdbc:oracle:thin:@127.0.0.1:1521:xe (Oracle 설치 서버 IP +  포트 + DB 이름)
spring.datasource.username=ID
spring.datasource.password=PW

 

-- MySql

spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver (MySql)

spring.datasource.url=mysql://localhost:3306/test_db (MySql 설치 서버 IP + 포트 + DB 이름)

spring.datasource.username=ID
spring.datasource.password=PW

Comments