a. This program emits continuously 5 random numbers per second.
b. Write a rest api using spring framework which takes the input as the output of first program and the output should be cumulation of all numbers seen, cumulation of numbers seen in last 5 mins, 10mins, 30mins at the time when rest call is made.
Steps to Run -
- Run MainApplication.java
- Hit this GET api from Postman - endpoint - http://localhost:8084/number-service/api/v1/numbers