Package io.quarkus.runtime.annotations
Annotation Type QuarkusMain
-
@Retention(RUNTIME) @Target(TYPE) public @interface QuarkusMain
The default main class of a Quarkus application. There are two different ways this annotation can be used. The first is to place it on a class with a Java main method. This main method will be the default entry point of the application. Note that Quarkus will not be started when this method is called, this method must launch Quarkus with theQuarkus.run(Class, String...)
method. Alternatively this annotation can be placed on anQuarkusApplication
implementation. In this case a main method is automatically generated that will automatically callQuarkus.run(Class, String...)
with the provided application. Note that this can be overridden by the presence of the quarkus.package.main-class configuration key. If this configuration key is used it can either specify the fully qualified name of a class with a Java main method, the fully qualified name of aQuarkusApplication
, or the name as given byname()
.
-
-
Element Detail
-
name
String name
The name of this main method, which must be unique.- Default:
- ""
-
-