Solution to the N26 challenge.
This application can be run either by using a JRE (8+) directly, or through Docker:
-
Install maven 3
-
Run the following command in the root directory of the project:
mvn package
-
Build the image. E.g.:
docker build --tag miguel-aragon-n26-challenge .
Option 1: Local JRE
java -jar target/n26-challenge.jar \
[-C[property]]
Option 2: Docker
docker run --name miguel-aragon-n26-challenge -p 8080:8080 \
[--env JAVA_OPTS=""] \
miguel-aragon-n26-challenge \
[-C[property]]
Properties can be specified by passing a -C
parameter. E.g.:
-Cspring.profiles.active=dev
The application uses Spring Boot so any of their properties can be specified (see Common application properties).
Additionally, the following application-specific properties can be defined:
Property | Description |
---|---|
mx.araco.miguel.n26.sampling-period |
Period of time that the SamplingStatisticsService calculates transaction statistics of (ISO 8601 duration) |
mx.araco.miguel.n26.sample-period |
How long it takes for the SamplingStatisticsService to sample new statistics (ISO 8601 duration) |
To run the tests you need to have installed maven 3 and run:
mvn test