JavaHostingExtensions
Classstaticnet10.0
Provides extension methods for adding Java applications to an
Hosting.IDistributedApplicationBuilder. namespace Aspire.Hosting;
public static class JavaHostingExtensions{ // ...}15 members
Methods15
Section titled MethodsIResourceBuilder<JavaAppResource> Adds a Java application to the application model, launched with
java. IResourceBuilder<JavaAppResource> Adds a Java application that runs a prebuilt JAR with
java -jar. IResourceBuilder<JavaContainerResource> Adds a Java application that runs from an existing container image.
IResourceBuilder<JavaAppResource> Adds a Quarkus application to the application model, built and launched with its own Maven or Gradle wrapper.
IResourceBuilder<JavaAppResource> Adds a Spring Boot application to the application model, built and launched with its own Maven or Gradle wrapper.
IResourceBuilder<T> Runs a Gradle build before the Java application starts.
IResourceBuilder<T> Launches the Java application through a Gradle task instead of
java, for example bootRun. IResourceBuilder<T> Selects the JAR the generated container image runs, for projects whose build produces more than one.
IResourceBuilder<T> Adds arguments to the Java Virtual Machine that runs the application.
IResourceBuilder<T> Sets the main class an IDE launches when running or debugging this application. Has no effect on how Aspire starts the process, which is decided by the JAR path, Maven goal, or Gradle task.
IResourceBuilder<T> Runs a Maven build before the Java application starts.
IResourceBuilder<T> Launches the Java application through a Maven goal instead of
java, for example spring-boot:run. IResourceBuilder<T> Runs the application with the OpenTelemetry Java agent from the location the build tool writes it to.
IResourceBuilder<T> Runs the application with the OpenTelemetry Java agent so it exports traces, metrics, and logs to Aspire.
IResourceBuilder<T> Overrides the build tool wrapper script path, for repositories whose wrapper is not in the default location or does not use the default name.