public class JsonPropertySourceLoader extends AbstractPropertySourceLoader
A PropertySourceLoader
that reads application.json
files if they exist.
Modifier and Type | Field and Description |
---|---|
static String |
FILE_EXTENSION
File extension for property source loader.
|
DEFAULT_POSITION, log
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
JsonPropertySourceLoader() |
JsonPropertySourceLoader(boolean logEnabled) |
Modifier and Type | Method and Description |
---|---|
Set<String> |
getExtensions() |
protected void |
processInput(String name,
InputStream input,
Map<String,Object> finalMap) |
protected Map<String,Object> |
readJsonAsMap(InputStream input) |
createPropertySource, getOrder, isLogEnabled, load, loadEnv, processMap, read, readInput, setLogEnabled
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
load
isEnabled
read
public static final String FILE_EXTENSION
public JsonPropertySourceLoader()
public JsonPropertySourceLoader(boolean logEnabled)
protected void processInput(String name, InputStream input, Map<String,Object> finalMap) throws IOException
processInput
in class AbstractPropertySourceLoader
name
- The nameinput
- The input streamfinalMap
- The map with all the properties processedIOException
- If the input stream doesn't existprotected Map<String,Object> readJsonAsMap(InputStream input) throws IOException
input
- The input streamIOException
- If the input stream doesn't exist