title: Default HikariCP connection pool starting Spring Boot application
body: <p>I'm using version: 2.1.6.RELEASE form Spring Boot in my pom.xml-dependencies.
  To connect to my database I put following in application.properties:</p>
  
  <pre><code>spring.datasource.url= jdbc:postgresql://
  spring.datasource.username=
  spring.datasource.password=
  </code></pre>
  
  <p>When checking the amount of connections in postgresql with:</p>
  
  <pre><code>SELECT * FROM pg_stat_activity;
  </code></pre>
  
  <p>I see each time I start the application exactly 10 connections are made. They almost all have the same query: </p>
  
  <pre><code>SET application_name = 'PostgreSQL JDBC Driver'
  </code></pre>
  
  <p>Is there a way to prevent the application of making that many connections?
  Should I make my own pool-configuration?
  What resource in my Java-application does initialize these connections?</p>
  
  <p>The only thing I can think of is that I create EntityManager(s) with the @Autowired annotation, EntityManager from:</p>
  
  <pre><code>javax.persistence.EntityManager;
  </code></pre>
  
  <p>But I read you should only close the connection this makes when using an EntityManagerFactory. The annotation should close the connection.</p>
  
  <p>If you would require more info, I could edit my post</p>