Skip to content

Latest commit

 

History

History
127 lines (101 loc) · 6.38 KB

build_and_execute_guide.adoc

File metadata and controls

127 lines (101 loc) · 6.38 KB

Building the Application

This section describes different ways to run this guide:

Regardless of how you choose to run the application, the output should be the same.

To run the application, you can package the application as an executable jar. The {jar_build_command} command compiles the application to an executable jar. You can then run the jar with the {jar_run_command} command.

Alternatively, if you have a Docker environment available, you could create a Docker image directly from your Maven or Gradle plugin, using buildpacks. With Cloud Native Buildpacks, you can create Docker compatible images that you can run anywhere. Spring Boot includes buildpack support directly for both Maven and Gradle. This means you can type a single command and quickly get a sensible image into a locally running Docker daemon. To create a Docker image using Cloud Native Buildpacks, run the {image_build_command} command. With a Docker environment enabled, you can run the application with the {image_run_command} command.

Native Image Support

Spring Boot also supports compilation to a native image, provided you have a GraalVM distribution on your machine.

You can then run the {native_build_command} command to generate a native image. When the build completes, you will be able to run the code with a near-instantaneous start up time by executing the {native_run_command} command.

You can also create a Native Image using Buildpacks. You can generate a native image by running the {native_image_build_command} command. Once the build completes, you can start your application with the {native_image_run_command} command.