본문 바로가기
Spring/Spring Study

[Spring-Boot] Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. 오류 해결

by ♡˖GYURI˖♡ 2024. 4. 19.

스프링 부트에 dependency들을 추가해주고 잘 되나 시험 삼아 돌렸는데 바로 에러가 났다.

 

Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

 

찾아보니 DB 관련 dependency를 추가한 상태에서 dataSource 설정을 해주지 않아서 발생한 것이었다.

나는 아직 DB 구축을 하지 않았으니 해당 dependency를 삭제하는 것으로 해결하였다.

 

dependency들을 미리 넣어두면 편할 것 같아서 빌드해둔 것이었는데 앞으로는 필요한 dependency만 설정해야겠다...