Problems with automatic execution of jpa,data.sql files in spring boot. How did it come true?

spring bootmaven1.3
spring-boot-starter-data-jpa
oracle 11g
:
spring.jpa.hibernate.ddl-auto=update
src/main/resourcesdata.sqlinsert intosql

start the project, and the SYS_ row table will be created in the database and generated by jpa according to
@ Entity
public class SysRole {
. At the same time, the statements in data.sql are executed to insert data into the table.

question: where is jpa configured? will you find the data.sql file and execute the sql statement inside?

however, in boot version 2.0, it was found that the sql statement in the data.sql file was not executed.

Mar.21,2021

SpringBoot loads the schema.sql and data.sql scripts under the classpath by default.
see DataSourceAutoConfiguration and DataSourceInitializer for specific source code.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e44500-44ab2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e44500-44ab2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?