The problem is that spring expects to find a file with either the name
data.sql in the classpath to load.
But your file is named
data-h2.sql so spring will not consider it, even if it is correctly placed in resources.
It could search for a file with the name
data-h2.sql and load it if you had configured the property
spring.datasource.platform = h2.
Without using the aforementioned property, there are 2 solutions:
Rename the file into
data.sqland be sure it is inside the resources folder
Do not rename the file and use the following application property to inform spring about the name of the file that it should load
CLICK HERE to find out more related problems solutions.