# Spring Boot Deployment

> Standards for GraalVM Native Images, Docker, and Graceful Shutdown

- Skill: `fierzone/spring-boot-deployment` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add fierzone/spring-boot-deployment`
- Raw SKILL.md: https://api.skillmd.com/api/skills/fierzone/spring-boot-deployment/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: fierzone (https://skillmd.com/u/fierzone)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/fierzone/spring-boot-deployment

---


# Spring Boot Deployment Standards

## **Priority: P0**

## Implementation Guidelines

### GraalVM Native Images (AOT)

- **Use Case**: Serverless/CLI tools requiring instant startup.
- **Constraints**: Register reflection via Runtime Hints. Libraries must be compatible.
- **Build**: Use `bootBuildImage` (Gradle) or `spring-boot:build-image` (Maven).

### Containerization (Docker)

- **Layered JAR**: Use standard Layered JAR support to optimize caching.
- **Security**: Run as non-root user (`nobody` or `appuser`).
- **Memory**: Set JVM limits proportional to container (`-XX:+UseContainerSupport`).

### Graceful Shutdown

- **Enable**: `server.shutdown=graceful` (default 30s timeout).
- **Process**: Stops accepting new requests, processes active ones.

## Anti-Patterns

- **Fat JAR**: `**No Fat JARs in Docker**: Use layers.`
- **Root User**: `**No Root**: Use restricted user.`
- **Baked Config**: `**No Baked Secrets**: Use Env/ConfigMaps.`

## References

- [Implementation Examples](references/implementation.md)

