Package io.micronaut.context.env
Interface PropertySourceLoader
-
- All Superinterfaces:
PropertySourceLocator,PropertySourceReader,io.micronaut.core.util.Toggleable
- All Known Implementing Classes:
AbstractPropertySourceLoader,PropertiesPropertySourceLoader,YamlPropertySourceLoader
public interface PropertySourceLoader extends io.micronaut.core.util.Toggleable, PropertySourceLocator, PropertySourceReader
Loads the given property source for the given environment.- Since:
- 1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.util.Optional<PropertySource>load(Environment environment)Load aPropertySourcefor the givenEnvironment.java.util.Optional<PropertySource>load(java.lang.String resourceName, io.micronaut.core.io.ResourceLoader resourceLoader)Load aPropertySourcefor the givenEnvironment.java.util.Optional<PropertySource>loadEnv(java.lang.String resourceName, io.micronaut.core.io.ResourceLoader resourceLoader, ActiveEnvironment activeEnvironment)Load aPropertySourcefor the givenEnvironment.-
Methods inherited from interface io.micronaut.context.env.PropertySourceReader
getExtensions, read, read
-
-
-
-
Method Detail
-
load
default java.util.Optional<PropertySource> load(Environment environment)
Load aPropertySourcefor the givenEnvironment.- Specified by:
loadin interfacePropertySourceLocator- Parameters:
environment- The environment- Returns:
- An optional of
PropertySource
-
load
java.util.Optional<PropertySource> load(java.lang.String resourceName, io.micronaut.core.io.ResourceLoader resourceLoader)
Load aPropertySourcefor the givenEnvironment.- Parameters:
resourceName- The resourceName of the resource to loadresourceLoader- TheResourceLoaderto retrieve the resource- Returns:
- An optional of
PropertySource
-
loadEnv
java.util.Optional<PropertySource> loadEnv(java.lang.String resourceName, io.micronaut.core.io.ResourceLoader resourceLoader, ActiveEnvironment activeEnvironment)
Load aPropertySourcefor the givenEnvironment.- Parameters:
resourceName- The resourceName of the resource to loadresourceLoader- TheResourceLoaderto retrieve the resourceactiveEnvironment- The environment to load- Returns:
- An optional of
PropertySource
-
-