title: Spring boot connection pool understanding
body: <p>In Spring boot application.properties file we have the following options:</p>
  
  <pre><code>server.tomcat.max-threads = 100
  server.tomcat.max-connections = 100
  spring.datasource.tomcat.max-active = 100
  spring.datasource.tomcat.max-idle = 30
  </code></pre>
  
  <p>This is my repository class </p>
  
  <pre><code>public interface UserRepository extends JpaRepository&lt;Users,Integer&gt;{}
  </code></pre>
  
  <p>This is the service class</p>
  
  <pre><code>@Service
  @Transactional(rollbackFor = Exception.class)
  public class UserService {
  
      @Autowired
      private UserRepository userRepository;
      public User getUserById(Integer id){return userRepository.findOne(id)}
  </code></pre>
  
  <p>The question is, how userRepository create the connection to DB and will it use the connection pool from my application properties file. I come from JDBC and hibernate where I used DataManager, DataSource, Connection classes to use the connection pool, but in spring boot I didn't have any line of code with this classes and everything work fine</p>