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

Configuration

The exact file codify apply uses. Copy it into your own codify.jsonc, or download it.

codify.jsonc106 lines · 2.7 KB
[
// ### Java Backend Development Environment
//
// Get from zero to a running Spring Boot API fast. This template wires together
// Java 21/25 (via jEnv), Maven & Gradle, Spring Boot CLI, PostgreSQL tooling,
// a curated VS Code setup, and handy aliases. Homebrew on macOS, apt on Linux.
{
"type": "homebrew",
"formulae": [
"git",
"maven",
"gradle",
"jq",
"spring-io/tap/spring-boot"
],
"os": ["macOS"]
},
{
"type": "apt",
"install": [
"git",
"maven",
"gradle",
"jq",
"openjdk-21-jdk",
"openjdk-25-jdk"
],
"os": ["linux"],
"distro": ["debian-based"]
},
{
"type": "jenv",
"add": ["21", "25"],
"global": "25",
"dependsOn": ["homebrew"]
},
{
"type": "vscode",
"extensions": [
"vscjava.vscode-java-pack",
"vmware.vscode-boot-dev-pack",
"vscjava.vscode-lombok"
],
"settings": {
"editor.formatOnSave": true,
"java.configuration.runtimes": [
{ "name": "JavaSE-21", "path": "$HOME/.jenv/versions/21" },
{ "name": "JavaSE-25", "path": "$HOME/.jenv/versions/25" }
],
"java.jdt.ls.java.home": "$HOME/.jenv/versions/25"
},
"dependsOn": ["jenv"]
},
// Spring Boot CLI via SDKMAN on Linux (Homebrew takes care of macOS)
{
"type": "action",Runs a script · asks first
"name": "spring-boot-linux",
"condition": "command -v spring &>/dev/null",
"action": "curl -s 'https://get.sdkman.io' | bash && source '$HOME/.sdkman/bin/sdkman-init.sh' && sdk install springboot",
"os": ["linux"]
},
// --- Spring Boot project scaffold aliases ---
{
"type": "alias",
"alias": "sb-new",
"value": "spring init --build=maven --java-version=21 --groupId=com.example --artifactId=myapp --dependencies=web,data-jpa,postgresql,lombok,validation,devtools,actuator --packaging=jar myapp",
"dependsOn": ["homebrew"]
},
{
"type": "alias",
"alias": "sb-new-gradle",
"value": "spring init --type=gradle-project --java-version=21 --groupId=com.example --artifactId=myapp --dependencies=web,data-jpa,postgresql,lombok,validation,devtools,actuator --packaging=jar myapp",
"dependsOn": ["homebrew"]
},
{
"type": "alias",
"alias": "sb-run",
"value": "./mvnw spring-boot:run"
},
{
"type": "alias",
"alias": "sb-build",
"value": "./mvnw clean package -DskipTests"
},
{
"type": "alias",
"alias": "sb-test",
"value": "./mvnw clean test"
},
// Shortcut versions for speed
{
"type": "alias",
"alias": "sbr",
"value": "./mvnw spring-boot:run"
},
{
"type": "alias",
"alias": "sbb",
"value": "./mvnw clean package -DskipTests"
},
{
"type": "alias",
"alias": "sbt",
"value": "./mvnw clean test"
}
]
Java backend setup template | Codify