SPRING
[ SPRING ] spring boot 실행 시 Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured 메시지 나올 때
정윤재
2021. 9. 27. 00:07
Spring 최초 실행 시
아래와 같은 메시지가 나올 경우
***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
Reason: Failed to determine a suitable driver class
=> 위와 같은 메시지가 나오면
application.properties (이클립스라면 src/main/resources 안에 있는 파일) 에 아래와 같이 DB 접속 정보를 입력 합니다. (저는 mysql 이어서 아래와 같이 설정 하였습니다.)
spring.datasource.url=jdbc:mysql://localhost:3306/test?autoReconnect=true
spring.datasource.username=root
spring.datasource.password=password123!
spring.datasource.driver-class-name=com.mysql.jdbc.Driver