[트러블 슈팅] 10. 더미 데이터 (DB)가 없는 상태에서 먼저 위치 찾는 코드를 적고 실행하면?

귤's avatar
Mar 19, 2025
[트러블 슈팅] 10. 더미 데이터 (DB)가 없는 상태에서 먼저 위치 찾는 코드를 적고 실행하면?

😞 왜 에러가 났을까?

notion image
notion image
notion image
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSourceScriptDatabaseInitializer' defined in class path resource [org/springframework/boot/autoconfigure/sql/init/DataSourceInitializationConfiguration.class]: No data scripts found at location 'classpath:db/data.sql'

🧐 해결

💡
templates 폴더에 data sql 파일이 없기 때문에 못 찾아서 에러가 난 것이다!
⇒ 주석 처리 해놓기! (아직 만들지 않아서 그렇다!)
notion image
notion image
 
 
Share article

gyul