title: Run SQL statement at beginning of each DB connection in Spring Boot
body: <p>How can I run a custom SQL statement directly after obtaining a DB connection with Spring Boot?</p>
  
  <p>The SQL needs to be run each time a new connection is established.</p>
  
  <p>The solution should work with the Spring Boot default DataSource implementation (which I think is a Tomcat pooling data source).</p>
  
  <p>It doesn't really matter what the statement is, but in my case it will be <code>ALTER SESSION SET CURRENT_SCHEMA=xxxx</code></p>