A simple example to get started with database connection pools and thread pools in Java. Whatch the video tutorial:
- Maven
- Java 17+
- A MariaDB database running on your machine or an instance in SkySQL.
Configure the database connection URL, username, and password in the constructor of the VotingService.
class.
The app requires the following table in the database:
CREATE TABLE programming_language
(
name VARCHAR(50) NOT NULL UNIQUE,
votes INT NULL
);
Execute the following in the command line:
git clone git@github.com:Programming-Brain/resource-pool-example.git
cd resource-pool-example
mvn package
java -jar target/resource-pool-example-1.0-SNAPSHOT.jar