diff --git a/.github/project.yml b/.github/project.yml index bf123b460..add531b90 100644 --- a/.github/project.yml +++ b/.github/project.yml @@ -1,3 +1,3 @@ release: - current-version: "2.0.0" - next-version: "2.0.1-SNAPSHOT" + current-version: "2.0.1" + next-version: "2.0.2-SNAPSHOT" diff --git a/quarkus-diameter/deployment/src/main/java/io/quarkiverse/diameter/deployment/DiameterProcessor.java b/quarkus-diameter/deployment/src/main/java/io/quarkiverse/diameter/deployment/DiameterProcessor.java index a8fdbc113..27c5657bc 100644 --- a/quarkus-diameter/deployment/src/main/java/io/quarkiverse/diameter/deployment/DiameterProcessor.java +++ b/quarkus-diameter/deployment/src/main/java/io/quarkiverse/diameter/deployment/DiameterProcessor.java @@ -176,6 +176,25 @@ public ServiceStartBuildItem generateDiameterConfiguration(DiameterRecorder reco profile.getProfileName().equals(DiameterConfig.DEFAULT_CONFIG_NAME)) .createWith(recorder.diameterStack(shutdownContextBuildItem, tlsRegistryBuildItem.registry(), diameterRunTimeConfig, profile.getProfileName())) .done()); + + //Handle the case where the default name is explicitly injected. + if (profile.getProfileName().equals(DiameterConfig.DEFAULT_CONFIG_NAME)) { + syntheticBeanBuildItemBuildProducer.produce( + createSyntheticBean(profile.getProfileName(), + Configuration.class, + DOTNAME_CONFIGURATION, + false) + .createWith(recorder.diameterConfiguration(tlsRegistryBuildItem.registry(), diameterRunTimeConfig, profile.getProfileName())) + .done()); + + syntheticBeanBuildItemBuildProducer.produce( + createSyntheticBean(profile.getProfileName(), + Stack.class, + DOTNAME_STACK, + false) + .createWith(recorder.diameterStack(shutdownContextBuildItem, tlsRegistryBuildItem.registry(), diameterRunTimeConfig, profile.getProfileName())) + .done()); + } }); return new ServiceStartBuildItem("DiameterService"); @@ -201,7 +220,12 @@ public void declareDiameterServicesAsBean(CombinedIndexBuildItem index, BuildPro private static SyntheticBeanBuildItem.ExtendedBeanConfigurator createSyntheticBean(String clientName, Class type, DotName exposedType, boolean isDefaultConfig) { LOG.info("Creating Synthetic Bean to {} for @DiameterClient(\"{}\")", type.getSimpleName(), clientName); - SyntheticBeanBuildItem.ExtendedBeanConfigurator configurator = SyntheticBeanBuildItem.configure(type).scope(ApplicationScoped.class).unremovable().setRuntimeInit().addType(exposedType); + SyntheticBeanBuildItem.ExtendedBeanConfigurator configurator = SyntheticBeanBuildItem + .configure(type) + .scope(ApplicationScoped.class) + .unremovable() + .setRuntimeInit() + .addType(exposedType); if (isDefaultConfig) { configurator.defaultBean();