1)오류 현상
Spring boot 맨 처음 셋팅하고 돌릴 때, 아래와 같은 에러가 떨어지고 start가 안됨.
2022-07-21 16:31:11.982 ERROR 16864 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
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
2)원인
데이터베이스 설정 정보가 없어서 오류가 났음.
'url' attribute is not specified and no embedded datasource could be configured.
3)해결 방법
Resources 디렉토리 밑에 application.properties에다가 database connection 정보를 적어줄 수도 있으나 비추천.
가장 빠른 방법은
Main application에다가 아래 어노테이션을 추가
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class })
public class ProjectApplication {
public static void main(String[] args) {
SpringApplication.run(ProjectApplication.class, args);
System.out.println("Test");
}
}
'IT' 카테고리의 다른 글
postgresql docker-compose.yml 설정 (0) | 2022.11.24 |
---|---|
docker 이미지 tar file 로드 (0) | 2022.11.23 |
docker 디렉토리 변경하는 방법 (0) | 2022.11.23 |
centos8버전에서 docker 설치 실패 (0) | 2022.11.23 |
리눅스 버전 확인 (0) | 2022.11.23 |