Building and deploying an executable archive

If you prefer not to use Docker, then you could deploy the app with a production profile locally by completing the following steps:

  1. First, make sure that MySQL DB is running from the previous step; otherwise, start it using docker-compose -f src/main/docker/mysql.yml up -d.
  2. Now, let's create an executable archive for the prod profile by running ./gradlew clean bootJar -Pprod.
  3. Once the build is successful, there will be an archive (JAR) created under build/libs. The store-0.0.1-SNAPSHOT.jar file is an executable archive that can be run directly on a JVM.
  4. Let's use the executable archive. Just run java -jar build/libs/store-0.0.1-SNAPSHOT.jar.

Once the application starts up, you will see the URL printed on the console. Visit http://localhost:8080 in your favorite browser to see the application in action.