Package io.micronaut.context.env
Interface PropertySourceLoader
- All Superinterfaces:
PropertySourceLocator
,PropertySourceReader
,Toggleable
- All Known Implementing Classes:
AbstractPropertySourceLoader
,CloudFoundryVcapApplicationPropertySourceLoader
,CloudFoundryVcapServicesPropertySourceLoader
,EnvJsonPropertySourceLoader
,JsonPropertySourceLoader
,JsonPropertySourceLoader
,PropertiesPropertySourceLoader
,YamlPropertySourceLoader
public interface PropertySourceLoader
extends Toggleable, PropertySourceLocator, PropertySourceReader
Loads the given property source for the given environment.
- Since:
- 1.0
- Author:
- Graeme Rocher
-
Method Summary
Modifier and TypeMethodDescriptiondefault Optional<PropertySource>
load
(Environment environment) Load aPropertySource
for the givenEnvironment
.load
(String resourceName, ResourceLoader resourceLoader) Load aPropertySource
for the givenEnvironment
.loadEnv
(String resourceName, ResourceLoader resourceLoader, ActiveEnvironment activeEnvironment) Load aPropertySource
for the givenEnvironment
.Methods inherited from interface io.micronaut.context.env.PropertySourceReader
getExtensions, read, read
Methods inherited from interface io.micronaut.core.util.Toggleable
isEnabled
-
Method Details
-
load
Load aPropertySource
for the givenEnvironment
.- Specified by:
load
in interfacePropertySourceLocator
- Parameters:
environment
- The environment- Returns:
- An optional of
PropertySource
-
load
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
Optional<PropertySource> loadEnv(String resourceName, 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
-