---
title: "Deploy Spring Boot on Patched Corretto 21"
description: "Spring Boot 4 starter on Corretto 21, Java4Shell patched"
category: "Starters"
url: https://railway.com/deploy/spring-boot-on-patched-corretto-21
---

# Deploy Spring Boot on Patched Corretto 21

Spring Boot 4 starter on Corretto 21, Java4Shell patched

**[Deploy Spring Boot on Patched Corretto 21 on Railway](https://railway.com/template/spring-boot-on-patched-corretto-21)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/spring-boot-on-patched-corretto-21/manifest.json

- **Creator:** ninja
- **Category:** Starters

## Template content

### spring-boot-corretto-patched

- **Source:** AdeelAhmedKhan/spring-boot-corretto-patched
- **Health check:** /actuator/health
- **Public domain:** Yes

## Documentation

# Deploy and Host Spring Boot on Patched Corretto 21 on Railway

Spring Boot 4.1.2 starter that runs on Amazon Corretto 21.0.13.1.2, the build that fixes Java4Shell (CVE-2026-114938), the pre-auth RCE flaw in OpenJDK's Base64 decoder disclosed on 17 November 2026. Both the build and runtime stages of the Dockerfile pin that exact Corretto build by tag and digest. Includes a small REST API, an actuator health endpoint at /actuator/health, and a /api/runtime endpoint that reports the JVM actually running, so you can prove the deployed service is on the patched build.

## About Hosting Spring Boot on Patched Corretto 21

Verified locally before publishing: full Maven build and tests pass on Corretto 21.0.13.1.2, the app boots, the health endpoint returns UP, and /api/runtime confirms Java 21.0.13.1 from 2026-11-17. A live Railway deploy has NOT been tested yet, so the Docker image build gets its first real test on your first deploy.

## Common Use Cases

- Starting a new Spring Boot 4 service on a patched Corretto 21 runtime
- Proving the deployed service is on the patched build via /api/runtime
- Monitoring the service with the actuator health endpoint at /actuator/health

## Dependencies for Spring Boot on Patched Corretto 21 Hosting

- Amazon Corretto 21.0.13.1.2, pinned by tag and digest in both Dockerfile stages
- Spring Boot 4.1.2
- Maven

### Implementation Details

The Dockerfile builder builds the image, the healthcheck path is /actuator/health, and the restart policy is ON_FAILURE with 10 retries. The service is exposed over public networking on port 8080.

## Why Deploy Spring Boot on Patched Corretto 21 on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Spring Boot on Patched Corretto 21 on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

## Similar templates

- [Openfront Gym](https://railway.com/deploy/openfront-gym) — Opensource Mindbody alternative based on Next.js and Keystone.js
- [open-excalidraw](https://railway.com/deploy/open-excalidraw) — Self-hostable collaborative drawing built on Excalidraw
- [Next.js + Prisma + PostgreSQL Starter](https://railway.com/deploy/nextjs-prisma-postgres) — Deploy a Next.js app with Prisma ORM and PostgreSQL in one click.

Open this page in a browser: https://railway.com/deploy/spring-boot-on-patched-corretto-21
