Package com.alibaba.cloud.nacos.parser
Class NacosJsonPropertySourceLoader
java.lang.Object
com.alibaba.cloud.nacos.parser.AbstractPropertySourceLoader
com.alibaba.cloud.nacos.parser.NacosJsonPropertySourceLoader
- All Implemented Interfaces:
org.springframework.boot.env.PropertySourceLoader
- Author:
- zkz
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.alibaba.cloud.nacos.parser.AbstractPropertySourceLoader
canLoad, flattenedMap, load
-
Constructor Details
-
NacosJsonPropertySourceLoader
public NacosJsonPropertySourceLoader()
-
-
Method Details
-
getFileExtensions
Returns the file extensions that the loader supports (excluding the '.').- Returns:
- the file extensions
-
doLoad
protected List<org.springframework.core.env.PropertySource<?>> doLoad(String name, org.springframework.core.io.Resource resource) throws IOException Load the resource into one or more property sources. Implementations may either return a list containing a single source, or in the case of a multi-document format such as yaml a source for each document in the resource.- Specified by:
doLoadin classAbstractPropertySourceLoader- Parameters:
name- the root name of the property source. If multiple documents are loaded an additional suffix should be added to the name for each source loaded.resource- the resource to load- Returns:
- a list property sources
- Throws:
IOException- if the source cannot be loaded
-
reloadMap
Reload the key ending in `value` if need.
-