A modern Spring Boot 3 microservice starter project featuring:
- Spring Cloud Config Server
- Netflix Eureka Discovery Service
- Spring Cloud Gateway
- Docker Compose integration
- Modular microservice architecture
- Distributed Tracing Using Zipkin
git clone https://github.com/deepaksorthiya/spring-boot-3-microservice.git
cd spring-boot-3-microservice
Start all required docker services using Docker Compose:
docker compose up
Update the configuration service properties:
- Open Config Server
spring-cloud-configuration-service/src/main/resources/application.properties - Set/verify the following properties values:
server.port=8888
spring.cloud.config.server.native.search-locations=file:///${user.dir}/config-files-all
Note:
For Windows OS configuration files are stored, e.g.file:///${user.dir}/config-files-all. On Windows, you need an extra "/" in the file URL if it is absolute with a drive prefix. For Linux/Mac-OS usefile://${user.dir}/config-files-all
For advanced configuration (e.g., using Git or S3), refer to the Spring Cloud Config documentation.
Start the following services in order:
- spring-cloud-configuration-service
- spring-cloud-netflix-discovery-service
- spring-cloud-gateway-service
Then start the remaining microservices:
All microservices are under spring-boot-api-microservices folder.
- department-service
- employee-service
- organization-service
- service-one
Use below command to run each services.
mvn spring-boot:run
- Use the provided Postman API Collection for testing endpoints.
- For distributed tracing check http://localhost:9411/zipkin
- Netflix Service Discovery http://localhost:8761