Skip to content

Latest commit

 

History

History
28 lines (17 loc) · 989 Bytes

03.fat-jar.md

File metadata and controls

28 lines (17 loc) · 989 Bytes

Building and Executing a Fat JAR

The Ktor Gradle plugin allows to create and run an executable JAR that includes all code dependencies (fat JAR).

  • Building the fat JAR: Employ the buildFatJar Gradle task provided by Ktor.

gradle fat JAR

  • To run the fat JAR locally, either execute the runFatJar Gradle task or use the command line. For the latter, open a terminal and navigate to the root build/libs directory, where the fat JAR is located. Execute the following command:
java.exe -jar krud-1.0.0-all.jar

Testing the fat JAR:

Upon server startup, observe the console output. Once initialization is complete, you can test the server by opening a web browser and navigating to any of the following URLs:

http://localhost:8080

http://localhost:8080/demo?page=0&size=24

http://localhost:8080/health

http://localhost:8080/rbac/login