Skip to content

Commit

Permalink
fix #1246: honor ConfigProperties.UNCONFIGURED_PREFIX again
Browse files Browse the repository at this point in the history
  • Loading branch information
jungm committed Nov 11, 2024
1 parent 7585890 commit beaf972
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,15 @@ protected void processConfigProperties(
// We are going to veto, because it may be a managed bean, and we will use a configurator bean
processAnnotatedType.veto();

// Unconfigured is represented as an empty String in SmallRye Config
String prefix = annotatedType.getAnnotation(ConfigProperties.class).prefix();
if (ConfigProperties.UNCONFIGURED_PREFIX.equals(prefix)) {
prefix = "";
}

// Each config class is both in SmallRyeConfig and managed by a configurator bean.
// CDI requires more beans for injection points due to binding prefix.
ConfigClass properties = ConfigClass.configClass(annotatedType.getJavaClass(),
annotatedType.getAnnotation(ConfigProperties.class).prefix());
ConfigClass properties = ConfigClass.configClass(annotatedType.getJavaClass(), prefix);
configProperties.add(properties);
configPropertiesBeans.add(properties);
}
Expand Down

0 comments on commit beaf972

Please sign in to comment.