Skip to content
forked from woorea/exchange

Example Spring Boot API consuming exchange rates like ECB

Notifications You must be signed in to change notification settings

JavaMoney/exchange

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exchange Rate API

Embedded Web Server Deployment

To bundle the product you will need Maven. Executing mvn clean install, you’ll get a fat jar. This jar is handy because it includes all the other dependencies and things like your web server inside the archive.

You can give anybody this one .jar and they can run your entire Spring application with no fuss: no build tool required, no setup, no web server configuration, etc: just java -jar exchange-0.0.1-SNAPSHOT.jar.

Example

curl "http://localhost:8080/convert?from_amount=1.283295&from_currency=GBP&to_currency=EUR"

{
  "date":"2017-04-03",
  "fromAmount":1.283295,
  "fromCurrency":"GBP",
  "toAmount":1.50515,
  "toCurrency":"EUR"
}

curl "http://localhost:8080/convert?from_amount=1.50515&from_currency=EUR&to_currency=GBP"

{
  "date":"2017-04-03",
  "fromAmount":1.50515,
  "fromCurrency":"EUR",
  "toAmount":1.283290890,
  "toCurrency":"GBP"
}

curl "http://localhost:8080/convert?date=2017-04-01&from_amount=1.50515&from_currency=EUR&to_currency=GBP"

{
  "date":"2017-04-01",
  "fromAmount":1.50515,
  "fromCurrency":"EUR",
  "toAmount":1.2877009795,
  "toCurrency":"GBP"
}

About

Example Spring Boot API consuming exchange rates like ECB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%