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 aPropertySourcefor the givenEnvironment.load(String resourceName, ResourceLoader resourceLoader) Load aPropertySourcefor the givenEnvironment.loadEnv(String resourceName, ResourceLoader resourceLoader, ActiveEnvironment activeEnvironment) Load aPropertySourcefor the givenEnvironment.Methods inherited from interface io.micronaut.context.env.PropertySourceReader
getExtensions, read, readMethods inherited from interface io.micronaut.core.util.Toggleable
isEnabled
-
Method Details
-
load
Load aPropertySourcefor the givenEnvironment.- Specified by:
loadin interfacePropertySourceLocator- Parameters:
environment- The environment- Returns:
- An optional of
PropertySource
-
load
Load aPropertySourcefor the givenEnvironment.- Parameters:
resourceName- The resourceName of the resource to loadresourceLoader- TheResourceLoaderto retrieve the resource- Returns:
- An optional of
PropertySource
-
loadEnv
Optional<PropertySource> loadEnv(String resourceName, 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
-