sts4 깃 임포트 후 db 연결 에러

2022. 1. 7. 01:24스프링부트

sts4 두개를 사용하고있었는데 
1번 sts4에서 개발 후 깃커밋, 2번 sts4에서 깃 임포트를 하고 프로젝트를 실행해보니 아래와 같은 에러가 떴다

 

 
Fri Jan 07 01:17:16 KST 2022
There was an unexpected error (type=Internal Server Error, status=500).
nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLRecoverableException: IO 오류: Invalid connection string format, a valid format is: "host:port:sid" ### The error may exist in file [C:\Users\82102\git\BAEMIN-bolg-note-version2\target\classes\com\baemin\mybatis\StoreMapper.xml] ### The error may involve store.storeList ### The error occurred while executing a query ### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLRecoverableException: IO 오류: Invalid connection string format, a valid format is: "host:port:sid"
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLRecoverableException: IO 오류: Invalid connection string format, a valid format is: "host:port:sid" ### The error may exist in file [C:\Users\82102\git\BAEMIN-bolg-note-version2\target\classes\com\baemin\mybatis\StoreMapper.xml] ### The error may involve store.storeList ### The error occurred while executing a query ### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLRecoverableException: IO 오류: Invalid connection string format, a valid format is: "host:port:sid"
 

 

오라클 접속정보는 아래처럼 했었고
 

 

 

sts4의 설정에서는 아래처럼 했었는데 

spring.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver
spring.datasource.url=jdbc:oracle:thin:@localhost:1521
spring.datasource.username=SUMIN
spring.datasource.password=QWE123

 

왜그런지는 모르겠지만 jdbc:oracle:thin:@localhost:1521 뒤에 : 을 붙여주니 해결되었다

spring.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver
spring.datasource.url=jdbc:oracle:thin:@localhost:1521:
spring.datasource.username=SUMIN
spring.datasource.password=QWE123