When working with a database the first thing you need is a connection to the database. A connection in Java is obtained through a javax.sql.DataSource. Spring provides out-of-the-box several implementations of a DataSource like the DriverManagerDataSource and SimpleDriverDataSource . However, these implementations aren’t connections pool and should be considered mainly for testing but not production use. For a live system, you want to use a proper connection pool like HikariCP.1
Tip
In the db folder there is a Dockerfile that will build a PostgreSQL2 with the database automatically ...