NOTE: All demo sue Spring Boot 3.2.0 and Java 21 and 17(CRaC)
-
New Clients: JdbcClient && RestClient (new-clients)
- Run postgres db:
docker run --name demo_postgres \
-d --rm -p 5433:5432 \
-e POSTGRES_PASSWORD=postgres \
--health-cmd "pg_isready -U postgres" \
--health-interval=10s \
--health-timeout=10s \
--health-retries=5 \
postgres:14-alpine
* Create database:
docker exec -it demo_postgres \
psql -U postgres -d postgres -c "create database spring_boot_updates_db"
-
Supports project Loom: Virtual threads for Spring Boot v3.2.0 (loom-support)
-
Support CRaC: Coordinated Restore at Checkpoint (crac-support)
- Build an app
mvn clean package -DskipTests && \ docker build -t crac-demo .
- run with privilege
docker run -it --rm --privileged -p 8889:8888 --name crac-demo crac-demo
- run java in container
java -XX:CRaCCheckpointTo=/opt/crac-files -jar /opt/app/crac.jar
- open new terminal, and execute docker image with crac ( check start time, ~ 2.2 sec)
docker exec -it crac-demo bash
- run java command for call checkpoint using PID of app
# ( 9 in this example is PID) jcmd 9 JDK.checkpoint
- for start killed checkpoint need to run next command ( check start time, ~ 280ms sec)
java -XX:CRaCRestoreFrom=/opt/crac-files/
-
Improvements for Security with SSL (ssl-improvements)
- Release in v3.1.1 spring bundle
- Create self-signed certs for demo
openssl req -x509 -subj "/CN=javaclub-demo" -keyout javaclub.key -out javaclub.crt -sha256 -days 365 -nodes -newkey ed25519
Resources:
- https://github.com/spring-projects/spring-boot/wiki/Supported-Versions
- https://spring.io/blog/2023/11/23/spring-boot-3-2-0-available-now
- https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.2-Release-Notes
- https://docs.spring.io/spring-framework/reference/integration/rest-clients.html
- https://spring.io/blog/2022/10/11/embracing-virtual-threads
- https://docs.spring.io/spring-framework/reference/integration/checkpoint-restore.html
- https://github.com/CRaC/docs
- https://wiki.openjdk.org/display/crac