vinayapkraj / Angular4_With_SpringBoot_Microservice_App

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Angular4 With SpringBoot Microservice

Sample application for viewing the Vehicle details and current status. Vehicle Service contains the details of Vehicles – Vehicle ID, Status, Registration number along with the customer ID – Foriegn key to the customer details.

Customer details are retrieved from Customer Service using Feign Client(CustomerApi).

Random vehicle status, Active and Disconnected updated for every minute. For the services registration and identification created Discovery service. As it is a small application and implemented without authentication services such as OAuth2, merged Gateway service with Discovery Service.

DB and JPA:

Used in memory database derby for storing the Vehicle and Customer details. Entity and table reference created in Vehicle.java and customer.java. Accessed the same using VehicleRepository and CustomerRepository. All CRUD operations are handled using these Repositories.

Unit Testing:

Implemented unit testing using MockMvc in repositories, controller for both Customer and vehicle Service.

UI:

Used Angular 4 and ngx datatable for displaying the Vehicle Details.
Implemented multiple column sorting and data can be filtered based on Customer name and Vehicle Status column.

Deployment Steps:

Open seperate command prompt for each service and change the path to respective target folder. Ex: cd ..\discovery-service\target. All the Jars are available in respective target folder. Run DiscoveryService, Customer Service, Vehicle Service using their Jars using the command java -jar

Please note that as Vehicle Service depends on Customer and Discovery Service, run the service as per above sequence.

Once all services are started, Angular application can be started using Node server. Open command Prompt and go to the project path and run

  1. npm install
  2. ng serve.

Application available in http://localhost:4200/

About


Languages

Language:Java 45.3%Language:TypeScript 21.5%Language:Shell 14.1%Language:Batchfile 10.9%Language:HTML 3.7%Language:JavaScript 3.6%Language:CSS 0.8%