Package org.confng.integration.micronaut
Class ConfNGPropertySourceLoader
- java.lang.Object
-
- org.confng.integration.micronaut.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 Summary
Constructors Constructor Description ConfNGPropertySourceLoader()Creates a ConfNG property source loader that loads all available properties.ConfNGPropertySourceLoader(Class<E> keyClass)Creates a ConfNG property source loader with the given key class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>asMap()Creates a Micronaut-compatible PropertySource map.Objectget(String key)Gets a property value.Set<String>getExtensions()Gets the extensions this loader supports.StringgetName()Gets the source name.intgetOrder()Gets the order of this loader (lower = higher priority).Set<String>getPropertyNames()Gets all property names.booleanisEnabled()Checks if this loader is enabled.Map<String,Object>load(String resourceName)Loads properties from ConfNG.
-
-
-
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
-
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.
-
-