Spring Boot

[spring boot/시행착오] Failed to configure a DataSource

라임오렌지원 2022. 9. 30. 14:23

Spring Boot 환경설정 후, localhost에서 열리나 보려고 무작정 돌렸는데

 

이와 같은 에러가 뜬다면 처음 프로젝트 생성 시 mysql 을 추가했었는데

mysql 설정을 안해줘서 그런다

 

이런 경우

application.properties 에 DB설정정보를 입력해주면 된다고 하는데, 지금 당장  DB를 쓸 건 아니라서 

 

build.gradle 에서 jpa와 mysql 을 주석처리하고 코끼리를 눌러서 다시 실행

 

8080포트로 열렸다

확인하면?

 

돌아가는 것을 확인할 수 있다.

이건 index.html이 없어서 뜨는 에러 페이지

제대로 안 돌아가면 이 페이지마저 안 뜬다.

 


참고사이트

 

https://haenny.tistory.com/298

 

Failed to determine a suitable driver class 오류 해결

오류 로그 ********************************* APPLICATION FAILED TO START ********************************* Description: Failed to configure a DataSource: 'url' attribute is not specified and no embed..

haenny.tistory.com

 

728x90