Skip to content

Latest commit

 

History

History
57 lines (41 loc) · 1.92 KB

File metadata and controls

57 lines (41 loc) · 1.92 KB

SpringRestServicesWIthRestTemplate

This project is to expose APIs and integrate using Rest Template to get transaction details and filter it based on transaction type from downstream system.

REST APIs

Sr. No. API Name Method Type Description Authentication Required 1 /getTransactions GET Returns all transactions. YES 2 /getDetailsForTransactionType POST Returns transactions matching requested transaction type. YES 3 /getAmountForTransactionType POST Returns total transaction amount for requested transaction type. YES

Prerequisites

Eclipse : To setup code for development Maven : To Build and package the code with Junit coverage report Tomcat 8.0 : To deploy application

Installing

Importing in Eclipse : Import as existing project Build using eclipse maven plugin or from command line

Build : Build code using below maven command

mvn clean package

Deploy :

  1. Start tomcat server

  2. Select WAR file to upload (Choose WAR file from target folder in project working directory)

  3. Deploy

  4. Confirm application deployment from server console

  5. Access the RESTAPIs with below path a. http://localhost://getTransactions b. http://localhost: //getDetailsForTransactionType c. http://localhost://getAmountForTransactionType e.g. http://localhost:8080/contextRoot/getAmountForTransactionType

  6. Accessing RESTAPIs : SOAP-UI or POSTman a. Choose basic authentication b. Select username : c. Select password : d. For post methods use below request and type “application/json”- { "payload": { "transactionType" : "" } }

Code Coverage

After mvn clean package command, open index.html file at below path /BackBaseOpenBank/BackBaseOpenBankIntegration/target/site/jacoco/index.html