title: Spring boot application.properties hibernate.generate_statistics
body: <p>After following various examples and reading the spring boot documentation I'm still unable to enable hibernate statistics. I'm setting the property in the application.properties file. Running the spring boot application via a integration test or <code>Application.java</code> produces no stats.</p>
  
  <p>My <code>application.properties</code> file.</p>
  
  <pre><code>    spring.datasource.jdbcUrl=jdbc:postgresql://localhost:5432/postgres
      spring.datasource.username = postgres
      spring.datasource.password = password
  
      spring.datasource.driver-class-name=org.postgresql.Driver
      spring.datasource.platform=postgres
  
      spring.datasource.testWhileIdle = true
      spring.datasource.validationQuery = SELECT 1
  
      spring.jpa.properties.hibernate.show_sql=true
      spring.jpa.properties.hibernate.format_sql=true
      spring.jpa.properties.hibernate.generate_statistics=true
  
      logging.level.org.hibernate.SQL=TRACE
      logging.level.org.hibernate.stat=TRACE
  
      logging.file=transaction-app.log
  </code></pre>
  
  <p>logback-spring.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;configuration&gt;
      &lt;include resource="org/springframework/boot/logging/logback/defaults.xml" /&gt;
      &lt;property name="LOG_FILE" value="${LOG_FILE:-${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}/}spring.log}"/&gt;
      &lt;include resource="org/springframework/boot/logging/logback/file-appender.xml" /&gt;
      &lt;root level="INFO"&gt;
          &lt;appender-ref ref="FILE" /&gt;
      &lt;/root&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>And my integration test</p>
  
  <pre><code>@RunWith(SpringRunner.class)
  @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
  public class SqlMappingTest {
  
      @Autowired
      PlanService planService;
  
      @org.junit.Test
      public void findAll() {
          List&lt;Plan&gt; plans = planService.findAll();
          Assert.assertEquals(1, plans.size());
  
      }
  }
  </code></pre>
  
  <p>What am I missing?</p>