springboot - microbase is an open-source starter project for quickly building scalable and maintainable Spring Boot-based microservices.
The project provides a solution for centralized log collection using Logstash, Elasticsearch, and Kibana, alongside monitoring capabilities with Prometheus, Jaeger, and Grafana. It also includes basic JPA functionality to facilitate database interactions.
For designing the database schema, we recommend using the following project: Evocelot/liquibase-base .
- Java 21
- SpringBoot 3.4.3
- Docker / Podman
- Make
- A Makefile simplifies the application's startup process.
- The application can be easily packaged as a Docker image.
- Built-in logging, metrics, and tracing (can be enabled/disabled as needed):
- Centralized log collection using ELK Stack (Elasticsearch, Logstash, Kibana).
- Metrics monitoring with Prometheus and Grafana.
- Distributed tracing support with Jaeger.
- Provides sample endpoints for managing example entities.
- Includes basic error handling.
- Automatically logs all incoming requests and outgoing responses.
- Supports JPA-based database integration.
To ensure the application functions correctly, you must first start the database container.
To set up the database container properly, the following project will assist you: Evocelot/liquibase-base
The liquibase-base project helps start the appropriate database container and create the necessary database schema.
The project includes a Makefile to simplify application startup. Each Makefile target can be executed independently.
NOTE: If you are using Docker instead of Podman, replace
podmanwithdockerin the Makefile commands.
To run the application along with ELK stack and observability features, execute:
make start-monitoring-containers
make start-kafka
make start-local-containerThis command starts the following containers:
- elasticsearch
- logstash
- kibana
- jaeger
- prometheus
- grafana
- kafka
- zookeeper
- kafka-ui
- sample-module
By default, the sample-module runs on port 8080.
The swagger UI can be accessed at: http://localhost:8080/swagger-ui/index.html
To run only the module only:
make start-local-containerNOTE: To disable log collection, tracing and communication via kafka, manually set the
LOGSTASH_ENABLED,TRACING_ENABLEDandKAFKA_ENABLEDenvironment variables to"false"in theMakefile.
Detailed documentation is available here: Documentation
Contributions to the project are welcome! If you find issues or have suggestions for improvements, feel free to open an issue or submit a pull request.