Package io.micronaut.jackson.env
Class JsonPropertySourceLoader
java.lang.Object
io.micronaut.context.env.AbstractPropertySourceLoader
io.micronaut.jackson.env.JsonPropertySourceLoader
- All Implemented Interfaces:
- PropertySourceLoader,- PropertySourceLocator,- PropertySourceReader,- Ordered,- Toggleable
A PropertySourceLoader that reads application.json files if they exist.
- Since:
- 1.0
- Author:
- Graeme Rocher
- 
Field SummaryFieldsFields inherited from class io.micronaut.context.env.AbstractPropertySourceLoaderDEFAULT_POSITION, logFields inherited from interface io.micronaut.core.order.OrderedHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidprocessInput(String name, InputStream input, Map<String, Object> finalMap) readJsonAsMap(InputStream input) Methods inherited from class io.micronaut.context.env.AbstractPropertySourceLoadercreatePropertySource, createPropertySource, getOrder, isLogEnabled, load, loadEnv, processMap, read, readInput, setLogEnabledMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.context.env.PropertySourceLoaderloadMethods inherited from interface io.micronaut.context.env.PropertySourceReaderreadMethods inherited from interface io.micronaut.core.util.ToggleableisEnabled
- 
Field Details- 
FILE_EXTENSIONFile extension for property source loader.- See Also:
 
 
- 
- 
Constructor Details- 
JsonPropertySourceLoaderpublic JsonPropertySourceLoader()
- 
JsonPropertySourceLoaderpublic JsonPropertySourceLoader(boolean logEnabled) 
 
- 
- 
Method Details- 
getExtensions- Returns:
- The extensions this reader supports.
 
- 
processInputprotected void processInput(String name, InputStream input, Map<String, Object> finalMap) throws IOException- Specified by:
- processInputin class- AbstractPropertySourceLoader
- Parameters:
- name- The name
- input- The input stream
- finalMap- The map with all the properties processed
- Throws:
- IOException- If the input stream doesn't exist
 
- 
readJsonAsMap- Parameters:
- input- The input stream
- Returns:
- map representation of the json
- Throws:
- IOException- If the input stream doesn't exist
 
 
-