A simple EURO currency exchange calculator.
The user's input, in EUROS, will be converted to foreign currencies based on cross-currency rates provided by the European Central Bank.
The exchange rates are fetched daily from the European Central Bank (ECB) Reference Rates.
- Java OpenJDK 8
- A MongoDB instance fully accessible
In you system terminal, navigate to a source-code folder of your choice and clone the repository with the command
$ git clone https://github.com/joaoblyss/coding-challenge.git
$ cd coding-challenge
After checking out the project, you'll need to set the following properties in the application.properties
file:
Property Key | Description |
---|---|
spring.data.mongodb.host |
Set here the MongoDB server address (host only) |
spring.data.mongodb.database |
Set here the name of the database you've created in the MongoDB server |
In the system terminal, execute the following:
$ ./mvnw spring-boot:run
⚠️ On Windows, you might need to use mvnw.cmd instead
This is how a successful startup should look like:
On the web browser, access http://localhost:8080
.
The GUI consists two basic input fields and one output, such as this:
In the input field, type the value, in EURO, to be converted into a foreign currency, then select in the dropdown below the target currency.
The result must be shown as below:
🚧 The text input still accepts alphabetic characters, but no calculation is performed unless the data input is a valid number.
Make sure the mvnw
file has the propper execution permissions.
$ chmod 744 mvnw
> icacls /grant:r Everyone:F mvnw.cmd
During the execution of the mvnw packaging tool under Ubuntu, there might be a failure concerning the trustAnchors
parameter, with the error message trustAnchors parameter must be non-empty
. To work around this, it might be necessary to purge certificates by doing as follows:
- remove the
/etc/ssl/certs/java/cacerts
- run
update-ca-certificates -f
- retry
mvnw spring-boot:run