Path Finder App

Prerequisites

Build

Project is build using Gradle Build Tool. It's not required to have it installed on the system as the project is shipped with Gradle Wrapper which doesn't require Gradle to be installed.

Bootable JAR

To create a bootable JAR which can be executed by JDK run the following:

  • Linux:

    ./gradlew bootJar
  • Windows

    ./gradlew.bat bootJar

This will generate a bootable JAR file in ./build/libs directory, which can be used to run the project.

Tests

To run tests, run the following:

  • Linux:

    ./gradlew clean test
  • Windows

    ./gradlew.bat clean test

The test results can be then viewed in the HTML report generated by the build.

Execution

There are multiple ways to start the application:

  • using Gradle,
  • executing bootable JAR file with java,
  • from IDE.

In all above cases, application will run on the http://localhost:8080 once it is started.

Gradle

To start the application using Gradle run the following command:

  • Linux:

    ./gradlew bootRun
  • Windows

    ./gradlew.bat bootRun

Execute bootable JAR file

To start the application by running the bootable JAR file with JDK 11, do the following:

  • build the project, see build,
  • run the following java command:
    java -jar ./build/libs/path-finder-0.0.1-SNAPSHOT.jar

Using IDE

Running the application from IDE is useful for testing new functionalities as well as debugging the application.

IntelliJ IDEA

To run the application from IntelliJ IDEA, do the following:

  • one-time steps:
    • (once) import the project as Gradle project,
    • create a new Spring Boot run configuration,
    • select com.pwc.test.pathfinder.PathFinderApplication as a main class,
    • save the configuration;
  • run the created Spring Boot run configuration.