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
Modifier and TypeMethodDescriptiondefault Optional<PropertySource>load(Environment environment) Load aPropertySourcefor the givenEnvironment.Load aPropertySourcefor the givenEnvironment.loadEnv(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, 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
Optional<PropertySource> load(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
Optional<PropertySource> loadEnv(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
-