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 aPropertySource
for the givenEnvironment
.java.util.Optional<PropertySource>
load(java.lang.String resourceName, io.micronaut.core.io.ResourceLoader resourceLoader)
Load aPropertySource
for the givenEnvironment
.java.util.Optional<PropertySource>
loadEnv(java.lang.String resourceName, io.micronaut.core.io.ResourceLoader resourceLoader, ActiveEnvironment activeEnvironment)
Load aPropertySource
for 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 aPropertySource
for the givenEnvironment
.- Specified by:
load
in 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 aPropertySource
for the givenEnvironment
.- Parameters:
resourceName
- The resourceName of the resource to loadresourceLoader
- TheResourceLoader
to 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 aPropertySource
for the givenEnvironment
.- Parameters:
resourceName
- The resourceName of the resource to loadresourceLoader
- TheResourceLoader
to retrieve the resourceactiveEnvironment
- The environment to load- Returns:
- An optional of
PropertySource
-
-