title: How to configure Spring Boot to execute a SQL query once with JdbcTemplate?
body: <p>I use Spring Boot and JdbcTemplate with Maven. I would like to execute a single SQL query in the database at start. </p>
  
  <p>Here is a example of the application.yml file :</p>
  
  <pre><code>spring
      datasource
        driverClassName: oracle.jdbc.OracleDriver
        url: jdbc:oracle://localhost/test
        username: dbuser
        password: dbpass
        initialize: true
  </code></pre>
  
  <p>I found on the web that it can be done by creating a data.sql file in the root of the classpath (/resources directory by example) (Visit <a href="http://docs.spring.io/spring-boot/docs/current/reference/html/howto-database-initialization.html" rel="nofollow">http://docs.spring.io/spring-boot/docs/current/reference/html/howto-database-initialization.html</a> for initialization a database using Spring JDBC). So I just create a data.sql file in the /resources directory, near the application.yml file, with content :</p>
  
  <pre><code>alter session set nls_numeric_characters='.,';
  </code></pre>
  
  <p>But, the data.sql file is not executed when starting the application. The implementation seems easy yet. Did I forget any parameterizations or dependencies ?</p>
  
  <p>I would be pleased to have some help. Thanks.</p>