Golden Path: Backend Spring Boot
Base template for Spring Boot (Java 21) services with hexagonal architecture, designed for high-performance enterprise microservices deployed on Cloud Run.
GitLab: templates/template-spring-bl
Detailed technical reference for the template: Spring BL Template.
Stack
| Component | Value |
|---|---|
| Language | Java 21 (JDK 21) |
| Framework | Spring Boot |
| Build | Gradle 8.11.1 (wrapper included) |
| Architecture | Hexagonal (Domain / Infrastructure / Application) |
| Runtime | Cloud Run |
| Observability | OpenTelemetry (Java Agent, OTLP) |
Modular features (tags)
The template enables capabilities through tags when creating the project, so you only include what you need:
| Tag | Capability |
|---|---|
Base | Hello World REST (/api/v1/greetings/hello). Always active |
Pubsub | Async messaging with Google Cloud Pub/Sub |
Database | PostgreSQL with Spring Data JPA (HikariCP) |
Liquibase | Database migrations (requires Database) |
Additionally, the template offers ready-to-use integration with Google Cloud Storage, Redis, Apache Kafka, and external REST services (OpenFeign), plus corporate security libraries and authorized base images.
Security
Security is configured in Google Cloud Endpoints (deploy/endpoints/openapi.yaml.erb) with two schemes:
- API Key (
x-api-keyheader) — identifies the calling app. - Azure ID Token (OAuth2,
Authorization: Bearerheader) — Azure AD authentication.
Local development requirements
- JDK 21
- Gradle 8.11.1 (or the
./gradlewwrapper) - Access to LATAM Artifactory (corporate dependencies, via
gradle.properties) - Docker (optional, for local PostgreSQL)
# Create from Cursor with the lifecycle skill
/create-app --golden-path=java-spring-boot --product=my-product
The application becomes available at http://localhost:8080/template-spring.