Class ConfNGPropertySourceLoader


  • public class ConfNGPropertySourceLoader
    extends Object
    Micronaut PropertySourceLoader adapter for ConfNG.

    This class allows ConfNG to be used as a PropertySourceLoader in Micronaut applications, enabling seamless integration with Micronaut's configuration system.

    Example Usage:

    {@code
     // Register in META-INF/services/io.micronaut.context.env.PropertySourceLoader
     // Add: org.confng.integration.micronaut.ConfNGPropertySourceLoader
     
     // Or programmatically:
    Since:
    1.1.0
    Author:
    Bharat Kumar Malviya, GitHub: github.com/imBharatMalviya
    • Constructor Detail

      • ConfNGPropertySourceLoader

        public ConfNGPropertySourceLoader​(Class<E> keyClass)
        Creates a ConfNG property source loader with the given key class.
      • ConfNGPropertySourceLoader

        public ConfNGPropertySourceLoader()
        Creates a ConfNG property source loader that loads all available properties.
    • Method Detail

      • getExtensions

        public Set<String> getExtensions()
        Gets the extensions this loader supports.
      • isEnabled

        public boolean isEnabled()
        Checks if this loader is enabled.
      • getOrder

        public int getOrder()
        Gets the order of this loader (lower = higher priority).
      • getName

        public String getName()
        Gets the source name.
      • getPropertyNames

        public Set<String> getPropertyNames()
        Gets all property names.
      • get

        public Object get​(String key)
        Gets a property value.
      • asMap

        public Map<String,​Object> asMap()
        Creates a Micronaut-compatible PropertySource map.