Demo application for order-management-system using spring microservices architecture
- Make sure Java 1.7 is available to run executable jar files
- Run Active MQ Server locally from tools/apache-activemq-5.11.1/bin/macos/activemq start
- Make sure there are no port blockings to interact multiple microservices in the system (Connect to internet)
To run the order management microservices system, open six CMD windows (Windows) or six Terminal windows (MacOS, Linux) and arrange so you can view them conveniently.
- In each window, change to the directory where you cloned the demo.
- In the first window, build the application using
mvn clean package
. This would have generated file in 'target/order-management-service.1.0.jar`. - In the same window run:
java -jar target/order-management-service.1.0.jar registration
- Switch to the second window and run:
java -jar target/order-management-service.1.0.jar product-catalog-service
- In the third window run:
java -jar target/order-management-service.1.0..jar pricing-service
- In the fourth window run:
java -jar target/order-management-service.1.0..jar tax-service
- In the fifth window run:
java -jar target/order-management-service.1.0..jar order-service
- In the sixth window run:
java -jar target/order-management-service.1.0..jar billing-service
- In the seventh window run:
java -jar target/order-management-service.1.0..jar mailing-service
- In your favorite browser or postman, open the links for each and access: You should see servers being registered in the log output of the first (registration) window. As you interact you should logging in the second and third windows.
- Open PostMan
- Click on Import and select OrderManagementSystem.postman_collection from the cloned demo.
- In a new window, run up a second account-server using HTTP port 2223:
java -jar target/microservices-demo-1.2.0.RELEASE.jar accounts 2223
- Allow it to register itself
- Kill the first account-server and see the web-server switch to using the new account-server - no loss of service.