인프런 커뮤니티 질문&답변

KeepHun님의 프로필 이미지

작성한 질문수

실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발

홈 화면과 레이아웃

Error creating bean with name 'dataSourceScriptDatabaseInitializer' 에러

해결된 질문

22.09.12 17:31 작성

·

10K

1

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dataSourceScriptDatabaseInitializer' defined in class path resource [org/springframework/boot/autoconfigure/sql/init/DataSourceInitializationConfiguration.class]: Unsatisfied dependency expressed through method 'dataSourceScriptDatabaseInitializer' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: org.h2.Driver

라는 에러가 나옵니다.

어떻게 해결해야할까요??

 

답변 1

1

David님의 프로필 이미지

2022. 09. 12. 17:33

안녕하세요. ahffk12370님, 공식 서포터즈 David입니다.

아래 글을 참고해주세요.

https://unhosted.tistory.com/83

감사합니다.

KeepHun님의 프로필 이미지
KeepHun
질문자

2022. 09. 12. 18:53

강의는 yml 파일을 사용하는것으로 아는데

properties파일을 수정하는 부분은 어떻게 다뤄야하나요??

David님의 프로필 이미지

2022. 09. 13. 09:08

properties 파일과 yml 파일은 포맷만 다를 뿐 설정을 위해 사용되는 것은 동일합니다.

아래 글을 참고해주세요.

https://fftl.tistory.com/m/15

 

조준형님의 프로필 이미지

2023. 02. 01. 12:41

감사합니다.

덕분에 삽의 역할을 제한 하게 되었습니다.(삽이 춤출뻔했음. @.@)

KeepHun님의 프로필 이미지

작성한 질문수

질문하기