Class ClassConfigPropertiesUtil


  • final class ClassConfigPropertiesUtil
    extends Object
    • Method Detail

      • generateStartupObserverThatInjectsConfigClass

        static void generateStartupObserverThatInjectsConfigClass​(io.quarkus.gizmo.ClassOutput classOutput,
                                                                  Set<org.jboss.jandex.DotName> configClasses)
        Generates a class like the following:
         @ApplicationScoped
         public class EnsureValidation {
        
             @Inject
             MyConfig myConfig;
        
             @Inject
             OtherProperties other;
        
             public void onStartup(@Observes StartupEvent ev) {
                 myConfig.toString();
                 other.toString();
             }
         }
         
        This class is useful in order to ensure that validation errors will prevent application startup