Starting from:

$30

Java Assignment -Micro-service for a small company Solved

You are assigned to create a micro-service for a small company, that would give an overview of acquired shares. It should be possible to report purchased share volumes and retrieve the already inserted information by employees. The application initially will have only RESTful API with JSON payloads in response but won't be limited only to this interface in the future. The data should be stored in embedded database, but it should be possible to swap current data storage to something else (MsSQL, Oracle DB etc.). 

Stock registration should accept: 

· share data (Company name, share name, share ISIN code, country, field of economic activity)  

· price per share in EUR (Ex. 10.10) 

· volume acquired in number (Ex. 12)  

· date (ISO format) 

· employee ID (Ex. 12345) 

It should be possible to register one single record or bulk consumption (multiple records in one file, for example multipart/form-data). 

Data validation should be performed before persisting and corresponding error message should be returned in case of invalid input. 

Share purchase data retrieval should provide (as a separate endpoint): 

· total spent amount of money grouped by month 

· list share acquiring records for specified month (each row should contain: Company name, share name, share ISIN code, country, field of economic activity, volume, date, price, total price, employee

ID)  

· statistics for each month, list share acquiring records grouped by share id (each row should contain: Company name, share name, share ISIN code, country, field of economic activity, average price, total volume, total price) 

Every request can be made either for all employees or for the specific employee (identified by id). 

Expected result: 

· RESTful API with JSON payloads in response 

· Language: Java 11 + 

· Any framework (preferably Spring boot). But keep in mind that usage of framework should be reasonable, and architecture of application should allow to switch frameworks. 

· Code should be covered by automatic tests 

· Object-oriented design principles 

 

More products