A practical Spring Boot foundation for production-oriented backend services.
The project establishes a small, deliberate engineering baseline around API development, validation, error handling, health checks, testing, and continuous integration.
It is intentionally not a full enterprise boilerplate.
- Spring Boot
- Java 21
- Maven Wrapper
- Type-safe application configuration
- REST API foundation
- Request validation
- RFC 9457-style
ProblemDetailerror responses - Global validation error handling
- Actuator health endpoints
- Liveness and readiness probes
- Application and build information
- Graceful shutdown
- JUnit 5
- Spring Boot Test
- MockMvc API tests
- Spotless + Google Java Format
- GitHub Actions CI
- Dependabot configuration
src/
├── main/
│ ├── java/com/allydevs/starter/
│ │ ├── StarterApplication.java
│ │ ├── config/
│ │ │ └── ApplicationProperties.java
│ │ ├── exception/
│ │ │ └── ApiExceptionHandler.java
│ │ └── web/
│ │ ├── ApiController.java
│ │ ├── ApiResponse.java
│ │ ├── EchoRequest.java
│ │ └── EchoResponse.java
│ │
│ └── resources/
│ └── application.yml
│
└── test/
└── java/com/allydevs/starter/
├── StarterApplicationTests.java
└── web/
└── ApiControllerTests.java
- Java 21
- Git
Maven does not need to be installed separately because the project includes the Maven Wrapper.
git clone https://github.com/allydevs-engineering/spring-boot-starter-kit.git
cd spring-boot-starter-kit./mvnw testThe application starts on:
http://localhost:8080
GET /api/v1Example response:
{
"name": "Spring Boot Starter Kit",
"version": "0.1.0",
"status": "UP"
}POST /api/v1/echo
Content-Type: application/jsonRequest:
{
"message": "Hello AllyDevs"
}Response:
{
"message": "Hello AllyDevs"
}The endpoint exists primarily to demonstrate request validation and API error handling.
Requests can use Jakarta Bean Validation annotations.
For example:
@NotBlank
@Size(max = 500)
String messageInvalid requests return a structured ProblemDetail response.
Example:
{
"type": "about:blank",
"title": "Invalid request",
"status": 400,
"detail": "Request validation failed",
"errors": {
"message": "message must not be blank"
}
}Spring Boot Actuator provides operational health endpoints.
GET /actuator/health
GET /actuator/health/liveness
GET /actuator/health/readiness
GET /actuator/info
These endpoints provide a foundation for containerized and orchestrated deployments without coupling the starter to a specific cloud provider or platform.
Application-owned configuration is represented through type-safe configuration properties.
Current configuration:
application:
name: Spring Boot Starter Kit
version: 0.1.0Environment-specific configuration can be supplied through Spring Boot's externalized configuration mechanisms.
The project uses Spotless with Google Java Format.
Format the project:
./mvnw spotless:applyCheck formatting:
./mvnw spotless:checkRun the complete verification:
./mvnw verifyThe project uses:
- JUnit 5
- Spring Boot Test
- MockMvc
The current tests verify:
- Application context startup
- Application information endpoint
- Valid API requests
- Invalid API requests
- Validation error responses
Run:
./mvnw testEvery push to main and pull request targeting main runs the CI workflow.
The workflow verifies:
Checkout
↓
Java 21
↓
Maven verify
↓
Spotless check
The repository should remain green before changes are merged.
- This starter deliberately does not include:
- Database
- JPA
- ORM configuration
- Liquibase
- Flyway
- Authentication
- Authorization
- Messaging
- Redis
- External service clients
- Docker
- Kubernetes manifests
- Cloud-provider configuration
- Business/domain logic
These concerns should be introduced when the application actually requires them.
Adding every possible enterprise technology to a starter makes the foundation harder to understand and harder to adapt.
The starter establishes boundaries without creating empty architectural layers.
Application-owned settings use typed configuration properties rather than scattered configuration access.
Validation failures use a consistent problem-details structure.
Health checks, graceful shutdown, and build information are established before application complexity grows.
Tests focus on observable API behavior and application startup rather than implementation details.
The same project should be easy to verify locally and automatically checked on GitHub.
See CONTRIBUTING.md for development and contribution guidelines.
See SECURITY.md for information about reporting security vulnerabilities.
This project is licensed under the MIT License. See LICENSE.
AllyDevs Engineering
Engineering capability for digital agencies.