AGENT SKILL
spring-boot-deployment
Standards for GraalVM Native Images, Docker, and Graceful Shutdown. Use when deploying Spring Boot apps as GraalVM native images, containers, or configuring shutdown. (triggers: Dockerfile, compose.yml, docker-layer, native-image, graceful-shutdown)
- License 许可
- MIT
- 最近更新
- 2026-06-24
- Stars
- ★ 67
- Forks
- 24
01 前言 Front Matter
- name
- spring-boot-deployment
- description
- Standards for GraalVM Native Images, Docker, and Graceful Shutdown. Use when deploying Spring Boot apps as GraalVM native images, containers, or configuring shutdown. (triggers: Dockerfile, compose.yml, docker-layer, native-image, graceful-shutdown)
02 资源文件 27
- 参考文档references/agent_skill_roots_contract.md2.5 KB
- 参考文档references/coordinator_runtime_contract.md2.6 KB
- 参考文档references/coordinator_summary_contract.md1009 B
- 参考文档references/environment_setup_runtime_contract.md2.6 KB
- 参考文档references/environment_state_contract.md2.3 KB
- 参考文档references/environment_state_schema.json6.7 KB
- 参考文档references/environment_worker_runtime_contract.md1.6 KB
- 参考文档references/meta_analysis_protocol.md1.5 KB
- 脚本references/scripts/coordinator-runtime/lib/artifacts.mjs2.4 KB
- 脚本references/scripts/coordinator-runtime/lib/cli-helpers.mjs3.5 KB
- 脚本references/scripts/coordinator-runtime/lib/core.mjs18.6 KB
- 脚本references/scripts/coordinator-runtime/lib/loop-health.mjs7.5 KB
- 脚本references/scripts/coordinator-runtime/lib/runtime-constants.mjs3.8 KB
- 脚本references/scripts/coordinator-runtime/lib/schemas.mjs37.2 KB
- 脚本references/scripts/coordinator-runtime/lib/validate.mjs4.8 KB
- 脚本references/scripts/coordinator-runtime/lib/worker-guards.mjs3.1 KB
- 脚本references/scripts/coordinator-runtime/lib/worker-runtime.mjs6.0 KB
- 脚本references/scripts/environment-setup-runtime/cli.mjs8.0 KB
- 脚本references/scripts/environment-setup-runtime/lib/guards.mjs4.3 KB
- 脚本references/scripts/environment-setup-runtime/lib/phases.mjs686 B
- 脚本references/scripts/environment-setup-runtime/lib/store.mjs6.1 KB
- 脚本references/scripts/environment-worker-runtime/cli.mjs7.2 KB
- 脚本references/scripts/environment-worker-runtime/lib/guards.mjs926 B
- 脚本references/scripts/environment-worker-runtime/lib/phases.mjs1.8 KB
- 脚本references/scripts/environment-worker-runtime/lib/store.mjs3.6 KB
- 参考文档references/storage_mode_detection.md2.0 KB
- 参考文档references/tracker_provider_contract.md3.5 KB
03 SKILL.md 正文
Spring Boot Deployment Standards
Priority: P0
Implementation Guidelines
Docker & Containerization
- Buildpacks: Use
bootBuildImage(Gradle) orspring-boot:build-image(Maven) for OCI-compliant images. - Layered JAR: Use
Layered JARsupport to optimize Build Cache. Use multi-stageDockerfile. - Security: Run as
non-rootuser. Useeclipse-temurinor Distroless as base image. - Secrets: NEVER commit secrets to Git. Inject via environment variables, Kubernetes Secrets, or Vault (spring.config.import). Never bake secrets into image layers.
GraalVM Native Image (AOT)
- Use Case: Serverless or CLI tools requiring instant startup and low memory footprint.
- Constraints: Use
AOTtransformations. Register reflection withRuntimeHintsif needed. - Health Checks: Include
Actuatorendpoints specifically for Liveness and Readiness probes.
Resource Tuning & Shutdown
- Graceful Shutdown: Enable
server.shutdown=gracefulwith a 30s timeout. - Memory: Use
-XX:+UseContainerSupportand-XX:MaxRAMPercentage=75.0. - Log Management: Log to
stdoutin Structured JSON for log aggregators.
Anti-Patterns
- No Fat JARs in Docker: Use Layered JAR support for better caching.
- No root container user: Run as restricted user (appuser/nobody).
- No baked-in secrets: Use Env vars or ConfigMaps, never image layers.