Micro Services Application using Spring Boot and Spring Cloud
This Project uses an application for Service Discovery
- Eureka Service Discovery Server (runs on port 8761)
And three microservices which are Eureka Clients
- Movie Catalog Service (runs on port 8081)
- Movie Ratings Data Service (runs on port 8082)
- Movie Info Service (runs on port 8083)
Movie Catalog Service discovers 2 other microservices and communicates with them using RestTemplate
Requirements :
#add pom.xml file You need to add pom.xml with the maven dependencies
#Create AWS RDS MySQL DB or a local MYSQL DB
#To Create a RDS MYSQL Database
- Create an RDS mysql 1st database named MovieCatalogDB (only 1 DB can be created from AWS RDS Console per service)
- Set the RDS DB to public accessibility to YES (just for testing purposes. in real projects its in a private VPC and can be used only from a authorized VPC)
- Copy the DB endpoint url, user name and pwd
- Open the Port 3306 for your local machine IP
#Use the DB tool Sqlectron
- Connect to the first mysql DB MovieCatalogDB creating from AWS RDS console. Create a table named movie_catalogue and insert sample data
- Create a 2nd database named MovieInfoDB. Create a table named movie_info and insert sample data
- Create a 3rd database named RatingsDataDB. Create a table named rating_info and insert sample data
#Update the DB credentials and Sever Port in application.properties file for every microservices project
- Start the Discovery Application Server Application first which runs on port 8761
- Run all three microservices which are registered which the Eureka Server
- Access http://localhost:8761 to see Eureka Discovery Server console and verify that all 3 microservices are up and registered
- Access http://localhost:8081/catalog/user_name to access Movie Catalog Microservice
- Access http://localhost:8082/movies/movie_id to access Movie Info Service
- Access http://localhost:8083/ratingsdata/user/user_name to access Ratings Data Service
- Microservice running on port 8081 consumes the services running on port 8082 and port 8083