Java backend setup

@codify/java-backend·Codify official·v1.0.1·Updated 22 h ago

Go from a new machine to a running Spring Boot API without fighting JDK versions or build tools.

0 appliesmacOS · Linux
Apply with CodifyCustomize a copy

Opens the template in the Codify dashboard. Applying doesn't create a setup; customizing makes a private copy you can edit.

Or from your terminal, with the Codify CLI
codify apply @codify/java-backend
This template runs 1 script on your machine. The Codify CLI shows you the exact command and asks before anything runs. Read the script

Java setup tends to go wrong in the same places: the wrong JDK on your path, Maven and Gradle that don't agree, and an editor pointed at neither. This template sorts all of that out and lets you switch Java versions per project, so an old service on 21 and a new one on 25 can live side by side.

It also adds a few shortcuts for the commands you'd otherwise type all day. sb-new creates a Spring Boot project with the usual web, JPA and PostgreSQL starters, then sbr, sbb and sbt run, build and test it.

Works on macOS and on Debian or Ubuntu.

What gets installed

homebrewgit, maven, gradle, jq, spring-io/tap/spring-boot
aptgit, maven, gradle, jq, openjdk-21-jdk, openjdk-25-jdk · debian-based
jenv21, 25 · 25
vscodevscjava.vscode-java-pack, vmware.vscode-boot-dev-pack, vscjava.vscode-lombok
aliassb-new · spring init --build=maven --java-version=21 --groupId=com.example --artifactId=myapp --dependencies=web,data-jpa,postgresql,lomb…
aliassb-new-gradle · spring init --type=gradle-project --java-version=21 --groupId=com.example --artifactId=myapp --dependencies=web,data-jpa,…
aliassb-run · ./mvnw spring-boot:run
aliassb-build · ./mvnw clean package -DskipTests
aliassb-test · ./mvnw clean test
aliassbr · ./mvnw spring-boot:run
aliassbb · ./mvnw clean package -DskipTests
aliassbt · ./mvnw clean test

Scripts

Asks before running
action · spring-boot-linuxContacts: get.sdkman.io
Condition (runs during plan)
command -v spring &>/dev/null
Action (runs during apply)
curl -s 'https://get.sdkman.io' | bash && source '$HOME/.sdkman/bin/sdkman-init.sh' && sdk install springboot

No reviews yet. Reviews come from people who applied this template.