Class JsonPropertySourceLoader
java.lang.Object
io.micronaut.context.env.AbstractPropertySourceLoader
io.micronaut.jackson.core.env.JsonPropertySourceLoader
- All Implemented Interfaces:
PropertySourceLoader, PropertySourceLocator, PropertySourceReader, Ordered, Toggleable
- Direct Known Subclasses:
EnvJsonPropertySourceLoader
A PropertySourceLoader that reads application.json files if they exist.
- Since:
- 1.0
- Author:
- Graeme Rocher
-
Field Summary
FieldsFields inherited from class AbstractPropertySourceLoader
DEFAULT_POSITION, logFields inherited from interface Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprocessInput(String name, InputStream input, Map<String, Object> finalMap) readJsonAsMap(InputStream input) Methods inherited from class AbstractPropertySourceLoader
createPropertySource, createPropertySource, getOrder, isLogEnabled, load, loadEnv, processMap, read, readInput, setLogEnabledMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PropertySourceLoader
loadMethods inherited from interface PropertySourceReader
readMethods inherited from interface Toggleable
isEnabled
-
Field Details
-
FILE_EXTENSION
-
-
Constructor Details
-
JsonPropertySourceLoader
public JsonPropertySourceLoader() -
JsonPropertySourceLoader
public JsonPropertySourceLoader(boolean logEnabled)
-
-
Method Details
-
getExtensions
-
processInput
protected void processInput(String name, InputStream input, Map<String, Object> finalMap) throws IOException- Specified by:
processInputin classAbstractPropertySourceLoader- Parameters:
name- The nameinput- The input streamfinalMap- 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
-