{"catalogRevision":"cat_726f873af6f566cc","recipeId":"page:guides:spring-boot:build-and-start","recipeRevision":"r1","canonicalPath":"/guides/spring-boot/build-and-start","label":"Configure build and start for Spring Boot","title":"How to set build and start commands for a Spring Boot app on Ample","family":"Framework operation","summary":"Build and start for a Spring Boot app on Ample. Verified on Spring Boot: the app built and started with the documented commands and answered on its public HTTPS URL. Build and start: ./mvnw -q -DskipTests package (or the Gradle wrapper) producing one application jar, then java -jar on the jvm-21 template (Temurin JDK 21) with server.port read from PORT.","representativeQueries":["Configure build and start for Spring Boot","Where can I host Configure build and start built with Spring Boot?","I need pinned build/start commands, port binding and a tested process lifecycle."],"breadcrumbIds":["discovery","stack","stack:frameworks","stack:framework-spring-boot","page:guides:spring-boot:build-and-start"],"breadcrumbs":[{"id":"discovery","label":"Agent hosting discovery","canonicalPath":"/discover/discovery","kind":"root"},{"id":"stack","label":"Frameworks and execution targets","canonicalPath":"/discover/stack","kind":"facet"},{"id":"stack:frameworks","label":"Frameworks","canonicalPath":"/discover/stack/frameworks","kind":"group"},{"id":"stack:framework-spring-boot","label":"Spring Boot","canonicalPath":"/discover/stack/framework-spring-boot","kind":"atom"},{"id":"page:guides:spring-boot:build-and-start","label":"Configure build and start for Spring Boot","canonicalPath":"/guides/spring-boot/build-and-start","kind":"recipe"}],"parentIds":["stack:framework-spring-boot","intent:configure-deployment","pattern:public-web-service"],"parents":[{"id":"stack:framework-spring-boot","label":"Spring Boot","canonicalPath":"/discover/stack/framework-spring-boot","kind":"atom"},{"id":"intent:configure-deployment","label":"Configure deployment","canonicalPath":"/discover/intent/configure-deployment","kind":"atom"},{"id":"pattern:public-web-service","label":"Public web service","canonicalPath":"/discover/pattern/public-web-service","kind":"atom"}],"resourceRequirements":["primitive:compute"],"infrastructureRequirements":[{"primitiveId":"primitive:compute","label":"Compute","canonicalPath":"/discover/primitive/compute","status":"verified","summary":"Apps run in isolated x86_64 Firecracker microVMs; sizes are the priced VM sizes."}],"framework":"Spring Boot","workload":"Configure build and start","releaseStatus":"published","supportStatus":"verified","executionStatus":"ready","docsOnly":false,"prerequisites":["A Spring Boot project (./mvnw -q -DskipTests package (or the Gradle wrapper) producing one application jar, then java -jar on the jvm-21 template (Temurin JDK 21) with server.port read from PORT)","An Ample account token with servers:write"],"testedConfiguration":{"template":"jvm-21","runtime":"java","size":"s-1vcpu-2gb","build":"./mvnw -q -DskipTests package","start":"java -jar $(ls target/*.jar | grep -v -- '-plain' | head -n 1)"},"inputSchema":{"additionalProperties":false,"properties":{"env":{"description":"Encrypted environment variables","items":{"pattern":"^[A-Z][A-Z0-9_]*=.*$","type":"string"},"maxItems":50,"type":"array"},"name":{"description":"App name","maxLength":63,"minLength":1,"pattern":"^[a-z0-9-]+$","type":"string"},"path":{"description":"Project directory or ample.toml service","maxLength":512,"minLength":1,"type":"string"},"release_command":{"description":"Migration command run before activation","maxLength":512,"type":"string"}},"required":["name","path"],"type":"object"},"outputSchema":null,"workflowSteps":[{"title":"Build and start","body":"./mvnw -q -DskipTests package (or the Gradle wrapper) producing one application jar, then java -jar on the jvm-21 template (Temurin JDK 21) with server.port read from PORT; the server must bind 0.0.0.0 on PORT."},{"title":"Deploy","body":"Run the synchronous deploy once and read the result.","command":"ample deploy . --name <app-name> --public"},{"title":"Verify","body":"Fetch the live URL on the example; on failure read the build and runtime logs.","command":"ample logs <deployment_id> --kind build"}],"examples":[{"title":"Spring Boot pattern fixture","description":"Verified build and start on Spring Boot.","sourceRef":"tests/deploy-canaries/spring-boot-patterns"}],"successChecks":[{"description":"app responds on its public URL","kind":"http_get","path":"/","expect":"ample canary spring boot patterns"}],"limitations":["Verified on the jvm-21 template at s-1vcpu-2gb."],"costEstimate":{"currency":"USD","monthlyAmount":5.0,"authoritative":true,"basis":"size prices from pricing.toml (loaded by the API) at build revision 3a3dfe06151688a20d397caac2aa66e562c23eb0","components":[{"name":"app server","size":"s-1vcpu-1gb","quantity":1.0,"monthlyAmount":5.0}],"note":"Upper-bound monthly price of the tested sizes. Buckets are allocation-priced per quota and not included."},"evidenceSummary":[{"kind":"canary_run","summary":"Spring Boot pattern fixture deployed on Ample (./mvnw -q -DskipTests package (or the Gradle wrapper) producing one application jar, then java -jar on the jvm-21 template (Temurin JDK 21) with server.port read from PORT); for this guide: the app built and started with the documented commands and answered on its public HTTPS URL.","observedAt":"2026-11-06T06:00:29Z","implementationRevision":"5e3f3dc4c9a9","expiresAt":"2027-05-05T06:00:29Z","scope":{"checks":[],"template":"jvm-21"}}],"lastVerifiedAt":"2026-11-06T06:00:29Z","mcpBinding":{"registryRef":"mcp:ample_deploy","toolName":"ample_deploy","schemaHash":"0802c329be823fa0695460cf73206d47a6fa0efa57417c386c34b6614a92ea5f","observedAt":"2026-11-06T06:16:17.558478534+00:00","implementationRevision":"4558e9477d09","requiredScopes":["servers:write"],"bindingState":"current"},"unknowns":[],"formats":{"html":"https://ample.computer/guides/spring-boot/build-and-start","markdown":"https://ample.computer/guides/spring-boot/build-and-start.md","json":"https://api.ample.computer/v1/catalog/recipes/page%3Aguides%3Aspring-boot%3Abuild-and-start"},"nextActions":[{"actionId":"browse-catalog","label":"Browse the catalog index","operationId":"catalog_index","method":"GET","relativePath":"/v1/catalog","origin":"api","parameters":{},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"search-recipes","label":"Search published recipes by intent, stack and constraints","operationId":"search_recipes","method":"POST","relativePath":"/v1/catalog/search","origin":"api","parameters":{"body":{"limit":5,"query":"Configure build and start for Spring Boot"}},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"plan:page:guides:spring-boot:build-and-start","label":"Prepare a side-effect-free deployment plan for an authorized project","operationId":"plan_deployment","method":"POST","relativePath":"/v1/catalog/plan","origin":"api","parameters":{"body":{"inputs":{},"projectId":"<workspace or server id you own>","recipeId":"page:guides:spring-boot:build-and-start","recipeRevision":"r1"}},"requiresAuthentication":true,"requiresApproval":false},{"actionId":"auth-setup","label":"Read the existing agent authentication setup","operationId":"existing_auth_setup","method":"GET","relativePath":"/mcp/setup","origin":"api","parameters":{},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"browse:stack:framework-spring-boot","label":"Browse Spring Boot","operationId":"browse_node","method":"GET","relativePath":"/v1/catalog/nodes/stack%3Aframework-spring-boot","origin":"api","parameters":{"nodeId":"stack:framework-spring-boot"},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"browse:intent:configure-deployment","label":"Browse Configure deployment","operationId":"browse_node","method":"GET","relativePath":"/v1/catalog/nodes/intent%3Aconfigure-deployment","origin":"api","parameters":{"nodeId":"intent:configure-deployment"},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"browse:pattern:public-web-service","label":"Browse Public web service","operationId":"browse_node","method":"GET","relativePath":"/v1/catalog/nodes/pattern%3Apublic-web-service","origin":"api","parameters":{"nodeId":"pattern:public-web-service"},"requiresAuthentication":false,"requiresApproval":false}]}