Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.pig.microservices.currencyexchangeservice;
- import java.math.BigDecimal;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.PathVariable;
- import org.springframework.web.bind.annotation.RestController;
- @RestController
- public class CurrencyExchangeController {
- @GetMapping("/currency-exchange/from/{from}/to/{to}")
- public ExchangeValue retrieveExchangeValue(@PathVariable String from,@PathVariable String to) {
- return new ExchangeValue(1000L,from,to,BigDecimal.valueOf(65));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement