page:guides:spring boot:schema changes

Apply database schema changes for Spring Boot

Summary

Schema changes for a Spring Boot app on Ample. Verified on Spring Boot: a --release-command migration ran before activation and its marker was readable by the live app (migrated=release-ok). 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.

Representative Queries

Prerequisites

Workflow Steps

  1. 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; the server must bind 0.0.0.0 on PORT.

  2. Run migrations as the release command

    Ample runs the command before activation and fails the release if it exits non-zero; keep migrations idempotent.
    Command: ample deploy . --name --public --release-command "python3 migrate.py"

  3. Verify

    Fetch the live URL and /p/migrated on the example; on failure, read the build and runtime logs.
    Command: ample logs --kind build

Success Checks

Limitations

Cost Estimate

Components

Next Actions

  1. Browse the catalog index - GET /v1/catalog
  2. Search published recipes - POST /v1/catalog/search
  3. Prepare a deployment plan - POST /v1/catalog/plan
  4. Read existing agent authentication setup - GET /mcp/setup

Examples