title: Spring Boot dont read data.sql but it read import.sql
body: <p>I want import DML script after spring creates tables.
  I was fighting with <strong><code>data.sql</code></strong> file but my application <strong>don't see it</strong>.
  I don't know why. It works when I rename <code>data.sql</code> to <strong><code>import.sql</code></strong>, but <strong>it should also work</strong> with <code>data.sql</code>.</p>
  
  <p>Anybody know why?</p>
  
  <p>My application.properties:</p>
  
  <pre><code>spring.jpa.hibernate.ddl-auto=create-drop
  spring.datasource.url=jdbc:postgresql://localhost:5432/yyy
  spring.datasource.username=xxx
  spring.datasource.password=xxx
  spring.datasource.driver-class-name=org.postgresql.Driver
  </code></pre>
  
  <p>I put <code>data.sql</code> into <code>src/main/resources</code></p>
  
  <p>When only data.sql is in <code>resources</code>:</p>
  
  <pre><code>2018-03-21 00:42:13.646  INFO 4740 --- [           main] o.h.t.schema.internal.SchemaCreatorImpl  : HHH000476: Executing import script 'org.hibernate.tool.schema.internal.exec.ScriptSourceInputNonExistentImpl@eebc0db'
  </code></pre>
  
  <p>When only import.sql (also in <code>src/main/resources</code>):</p>
  
  <pre><code>2018-03-21 00:48:57.023  INFO 16600 --- [           main] o.h.t.schema.internal.SchemaCreatorImpl  : HHH000476: Executing import script 'ScriptSourceInputFromUrl(file:/C:/Users/Pawel/Desktop/Project/target/classes/import.sql)'
  </code></pre>
  
  <p>When i type <code>spring.datasource.data=data.sql</code> into <code>application.properties</code></p>
  
  <pre><code>Exception in thread "SimpleAsyncTaskExecutor-2" org.springframework.boot.context.properties.source.InvalidConfigurationPropertyValueException: Property spring.datasource.data with value 'ServletContext resource [/data.sql]' is invalid: The specified resource does not exist.
      at org.springframework.boot.autoconfigure.jdbc.DataSourceInitializer.getResources(DataSourceInitializer.java:169)
      at org.springframework.boot.autoconfigure.jdbc.DataSourceInitializer.getScripts(DataSourceInitializer.java:151)
      at org.springframework.boot.autoconfigure.jdbc.DataSourceInitializer.initSchema(DataSourceInitializer.java:114)
      at org.springframework.boot.autoconfigure.jdbc.DataSourceInitializerInvoker.onApplicationEvent(DataSourceInitializerInvoker.java:93)
      at org.springframework.boot.autoconfigure.jdbc.DataSourceInitializerInvoker.onApplicationEvent(DataSourceInitializerInvoker.java:37)
      at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
      at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
      at org.springframework.context.event.SimpleApplicationEventMulticaster.lambda$multicastEvent$0(SimpleApplicationEventMulticaster.java:136)
      at java.lang.Thread.run(Thread.java:745)
  </code></pre>
  
  <p>I can see both <code>data.sql</code> and <code>import.sql</code> in <code>target/classes/data.sql</code>, <code>target/classes/import.sql</code> ...</p>