src > main > resources에서 data.sql이라는 더미 데이터를 생성 시 발생하는 오류

Caused by: org.springframework.jdbc.datasource.init.ScriptStatementFailedException: Failed to execute SQL script statement #1 of file

 

스프링 부트 2.5 버전부터 data.sql을 사용한 데이터 초기화를 권장하지 않기 때문에 추가 설정이 필요함

 

src > main > resources 디렉터리에 있는 application.properties 파일에서 해당 코드 추가 후 서버 재시작하면 해결됨

spring.jpa.defer-datasource-initialization=true

 

반응형

+ Recent posts