HTTP server with REST API for money transfer between bank accounts. Description of the task can be found in TASK.md file.
Please note: If we're on Windows, use gradlew.bat
instead of ./gradlew
script
- This application requires Java 11 for building and running
- To build an application, execute:
./gradlew build
- To start an application on default port
8000
, execute:./gradlew run
- To build an application as a "fat jar", execute:
./gradlew shadowJar
- To start an application as a "fat jar" on the default port
8000
, execute:java -jar build/libs/app-1.0-SNAPSHOT-all.jar
- To start an application as a "fat jar" on a custom port, execute:
java -jar build/libs/app-1.0-SNAPSHOT-all.jar PORT_NUMBER
wherePORT_NUMBER
is an integer value
- Start Docker Daemon if it's not runnig:
sudo dockerd &
- Start compiled application:
java -jar build/libs/app-1.0-SNAPSHOT-all.jar
- Run ReDoc:
./gradlew redoc
(if you're Windows user, run contents from theredoc.sh
script manually) - Open website with documentation in the web browser:
http://localhost:9000
- Moreover, API is also documented by tests in
RestApiIntegrationTest
class
- running all tests:
./gradlew test
- running unit tests:
./gradlew test -Dtest.profile=unit
- running integration (REST API) tests:
./gradlew test -Dtest.profile=integration
- creating test coverage report:
./gradlew test jacocoTestReport
(report will be inbuild/reports/jacoco/
dir)
Code style used in the project is called Square
from Java Code Styles repository by Square.