In Spring boot application.properties file we have the following options:
server.tomcat.max-threads = 100
server.tomcat.max-connections = 100
spring.datasource.tomcat.max-active = 100
spring.datasource.tomcat.max-idle = 30
This is my repository class
public interface UserRepository extends JpaRepository<Users,Integer>{}
This is the service class
@Service
@Transactional(rollbackFor = Exception.class)
public class UserService {
@Autowired
private UserRepository userRepository;
public User getUserById(Integer id){return userRepository.findOne(id)}
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