This is an example project to demonstrate the usage of Spring Cloud + ECS to implement a microservices architecture.
This project is based on the Spring Cloud base architecture (https://spring.io/cloud).
-
Spring Cloud Configuration Server (config-server): serves configuration to all services based on hierarchical and profile based YAML configuration files stored in a Git repository
-
Eureka (eureka): provides service registry and discovery
-
Hello Service (hello-service): example greeting service
-
Weather Service (weather-service): example weather service connecting to a third party API using RestTemplate
-
Spring Cloud Gateway: exposes multiple microservices for external usage, provides swagger documentation
-
Spring Boot Admin (spring-boot-admin): tools to verify current state individual microservice instances, change logging levels, etc
To build docker images you can run mvn -P docker-build clean package.
Make sure you have a Docker Desktop or alternative running.
In case you're using MacOS with Colima, run the following in your terminal and then restart IntelliJ
launchctl setenv DOCKER_HOST unix://${HOME}/.colima/docker.sock
- Make sure you have Docker and Docker Compose installed
- Just run
docker-compose up
A simple maven build will do mvn clean package.
- Just start the services by running the
mainmethod in the*Application.javaclasses in the following order:- config-server
- eureka
- others