Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. package com.pig.microservices.currencyexchangeservice;
  2.  
  3. import java.math.BigDecimal;
  4.  
  5. import org.springframework.web.bind.annotation.GetMapping;
  6. import org.springframework.web.bind.annotation.PathVariable;
  7. import org.springframework.web.bind.annotation.RestController;
  8.  
  9. @RestController
  10. public class CurrencyExchangeController {
  11. @GetMapping("/currency-exchange/from/{from}/to/{to}")
  12. public ExchangeValue retrieveExchangeValue(@PathVariable String from,@PathVariable String to) {
  13. return new ExchangeValue(1000L,from,to,BigDecimal.valueOf(65));
  14. }
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement