Error creating bean with name 'dataSourceScriptDatabaseInitializer' defined in class path resource [org/springframework/boot/autoconfigure/sql/init/DataSourceInitializationConfiguration.class]: Invocation of init method failed;nested exception is org.springframework.jdbc.datasource.init.ScriptStatementFailedException: ~~
# ์ค๋ฅ ๋ด์ฉ
data.sql ์ ์์ ๋ฐ์ดํฐ๋ฅผ ๋ฃ์ด ๋๊ณ ์๋ฒ๋ฅผ ์คํ์์ผฐ๋๋ฐ ์ฒ์๋ณด๋ ์๋ฌ๋ฅผ ๋ง๋ฌ๋ค.
table์ ์ฐพ์ ์ ์๋ค๋ ์๋ฌ์๋ค.
ํด๋น ํ ์ด๋ธ๊ณผ ๊ด๋ จ๋ ์ํฐํฐ๋ ์๋์ ๊ฐ๋ค.
# RELASE NOTE
์คํ๋ง๋ถํธ 2.5 ๋ฒ์ ์ ๋ฆด๋ฆฌ์ค ๋ ธํธ์๋ ๋ค์๊ณผ ๊ฐ์ด ์ค๋ช ์ด ๋์ด์์ต๋๋ค.
๋ฐ๋ผ์ ์ ์ค๋ฅ๋ Hibernate๊ฐ ์ด๊ธฐํ๋๊ธฐ ์ ์ data.sql์ด ๋จผ์ ์คํ๋์ด์ ๋ฐ์ํ๋ ์ค๋ฅ์ ๋๋ค.
# application.yml ์ค์
ํด๊ฒฐ ๋ฐฉ๋ฒ์ผ๋ก application ์ค์ ํ์ผ์ spring.jpa.defer-datasource-initialization: true๋ก ์ค์ ํด์ฃผ๋ฉด ๋ฉ๋๋ค.
์์ ๊ฐ์ด ์ค์ ํ๊ณ ์ ํ๋ฆฌ์ผ์ด์ ์ ์คํํ๋ฉด ์ ์์ ์ผ๋ก ์คํ์ด ๋ฉ๋๋ค.