Spring Boot 4 cheatsheet
Spring Boot 4: Create and run
6 common Spring Boot 4 tasks.
Generate a project
Download a starter project from start.spring.io with the dependencies you choose.
curl https://start.spring.io/starter.zip -d type=maven-project -d language=java -d dependencies=web,data-jpa,actuator -d name=demo -o demo.zip
Package an executable jar
Build a jar that contains the app and its dependencies.
./mvnw clean package
Build a container image
Build an OCI image with Cloud Native Buildpacks, no Dockerfile needed. Needs Docker running.
./mvnw spring-boot:build-image