Spring Virtual Threads
https://gitorko.github.io/spring-virtual-threads/
Check version
$java --version
openjdk 21
Check apache benchmark
$ ab -V
This is ApacheBench, Version 2.3 <$Revision: 1903618 $>
docker run -p 5432:5432 --name pg-container -e POSTGRES_PASSWORD=password -d postgres:9.6.10
docker ps
docker exec -it pg-container psql -U postgres -W postgres
CREATE USER test WITH PASSWORD 'test@123';
CREATE DATABASE "test-db" WITH OWNER "test" ENCODING UTF8 TEMPLATE template0;
grant all PRIVILEGES ON DATABASE "test-db" to test;
docker stop pg-container
docker start pg-container
To build the code.
./gradlew clean build
ab -n 10 -c 2 http://localhost:8080/customer/block/3