Skip to content

khalsa/Microservices-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Microservices-example

Microservices Example using Spring Cloud

Quick Microservices Bootstraping on your local machine.

Pre-requites :-
1) Maven 3.0+

2) JDK/JRE 1.8+

This example covers following functionalties :-
1) Creating Rest full services using Spring boot.

2) ServiceRegistry using Eureka.

3) Hysterix, Ribbon enabled feign client.

Simply import the project in your IDE and build the parent pom.

Start each of the module using maven command mvn spring-boot:run.

Embedded Tomcat port has been changed in order to make it run on a single machine.

In order to test load balancing EmployeeRest and EmployeeRestSecond module are registered to Eureka server with same name employee-service in bootstrap.yml file.

Once Eureka and EmployeeService is up, navigate to localhost:8761, notice only one instance of Employee-Service. Start EmployeeRestSecond application, notice two instances registered with eureka.

Once all applications are up hit http://localhost:8086/rest/getAllEmployees, notice request reaching to both the deployed employee rest service instance in round-robin(default) strategy.

About

Microservices Example Spring Cloud

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages