Criando o projeto no Spring initializr não veio com o arquivo data.sql, então eu criei manualmente, porém, quando tento rodar o projeto com o arquivo criado, da erro, mesmo com o arquivo vazio, sem nenhum script e quando escrevo algum script também da problema.
application.properties:
# data source
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.url=jdbc:h2:mem:teste-usuarios
spring.datasource.username=sa
spring.datasource.password=
# jpa
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
spring.jpa.hibernate.ddl-auto=update
# h2
spring.h2.console.enabled=true
spring.h2.console.path=/h2-console
Erro:
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-02-23 17:28:43.580 ERROR 29890 --- [ restartedMain] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Initialization of bean failed; nested exception is org.springframework.jdbc.datasource.init.UncategorizedScriptException: Failed to execute database script from resource [URL [file:/Users/jobsonmateus/Developer/teste/target/classes/data.sql]]; nested exception is java.lang.IllegalArgumentException: 'script' must not be null or empty