From bbd53ba056d22270ae5fd716dd385856f870c63e Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Mon, 17 Apr 2023 16:47:00 +0200 Subject: [PATCH] Make mailer beans default beans Fixes #32685 --- .../java/io/quarkus/mailer/deployment/MailerProcessor.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extensions/mailer/deployment/src/main/java/io/quarkus/mailer/deployment/MailerProcessor.java b/extensions/mailer/deployment/src/main/java/io/quarkus/mailer/deployment/MailerProcessor.java index 95fb5a051f07b..4d5dc582cf76b 100644 --- a/extensions/mailer/deployment/src/main/java/io/quarkus/mailer/deployment/MailerProcessor.java +++ b/extensions/mailer/deployment/src/main/java/io/quarkus/mailer/deployment/MailerProcessor.java @@ -151,6 +151,7 @@ private void generateMailerBeansForName(String name, .scope(Singleton.class) .qualifiers(qualifier) .unremovable() + .defaultBean() .setRuntimeInit() .addInjectionPoint(ClassType.create(DotName.createSimple(Mailers.class))) .createWith(recorder.mailClientFunction(name, mailersRuntimeConfig)) @@ -159,6 +160,7 @@ private void generateMailerBeansForName(String name, .scope(Singleton.class) .qualifiers(qualifier) .unremovable() + .defaultBean() .setRuntimeInit() .addInjectionPoint(ClassType.create(DotName.createSimple(Mailers.class))) .createWith(recorder.reactiveMailClientFunction(name, mailersRuntimeConfig)) @@ -167,6 +169,7 @@ private void generateMailerBeansForName(String name, .scope(Singleton.class) .qualifiers(qualifier) .unremovable() + .defaultBean() .setRuntimeInit() .addInjectionPoint(ClassType.create(DotName.createSimple(Mailers.class))) .createWith(recorder.mailerFunction(name, mailersRuntimeConfig)) @@ -175,6 +178,7 @@ private void generateMailerBeansForName(String name, .scope(Singleton.class) .qualifiers(qualifier) .unremovable() + .defaultBean() .setRuntimeInit() .addInjectionPoint(ClassType.create(DotName.createSimple(Mailers.class))) .createWith(recorder.reactiveMailerFunction(name, mailersRuntimeConfig)) @@ -183,6 +187,7 @@ private void generateMailerBeansForName(String name, .scope(Singleton.class) .qualifiers(qualifier) .unremovable() + .defaultBean() .setRuntimeInit() .addInjectionPoint(ClassType.create(DotName.createSimple(Mailers.class))) .createWith(recorder.mockMailboxFunction(name, mailersRuntimeConfig))