From 78191c0f81f61f7f7c3e7cd7461b945e2d082022 Mon Sep 17 00:00:00 2001 From: Martin Kouba Date: Tue, 13 Sep 2022 14:19:16 +0200 Subject: [PATCH] ArC - support non-producer methods annotated with @Startup - resolves #11710 --- .../main/java/io/quarkus/runtime/Startup.java | 35 +++++-- .../arc/deployment/StartupBuildSteps.java | 91 ++++++++++++++----- .../test/startup/StartupAnnotationTest.java | 41 +++++++-- 3 files changed, 129 insertions(+), 38 deletions(-) diff --git a/core/runtime/src/main/java/io/quarkus/runtime/Startup.java b/core/runtime/src/main/java/io/quarkus/runtime/Startup.java index e57a74b26bf8c..43750635fffa9 100644 --- a/core/runtime/src/main/java/io/quarkus/runtime/Startup.java +++ b/core/runtime/src/main/java/io/quarkus/runtime/Startup.java @@ -12,11 +12,20 @@ import javax.enterprise.inject.spi.ObserverMethod; /** - * This annotation can be used to initialize a CDI bean at application startup. The behavior is similar to a declaration of an - * observer of the {@link StartupEvent} - a contextual instance is created and lifecycle callbacks (such as - * {@link javax.annotation.PostConstruct}) are invoked. In fact, a synthetic observer of the {@link StartupEvent} is generated - * for each bean annotated with this annotation. Furthermore, {@link #value()} can be used to specify the priority of the - * generated observer method and thus affect observers ordering. + * This annotation can be used to initialize a CDI bean at application startup: + *