public abstract class AbstractPropertySourceLoader extends Object implements org.springframework.boot.env.PropertySourceLoader
1.inherit AbstractPropertySourceLoader;
2. define the filespring.factories and append
org.springframework.boot.env.PropertySourceLoader=..;
3.the last step validate.
NacosByteArrayResource .| Constructor and Description |
|---|
AbstractPropertySourceLoader() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canLoad(String name,
org.springframework.core.io.Resource resource)
Prevent interference with other loaders.Nacos-specific loader, unless the reload
changes it.
|
protected abstract List<org.springframework.core.env.PropertySource<?>> |
doLoad(String name,
org.springframework.core.io.Resource resource)
Load the resource into one or more property sources.
|
protected void |
flattenedMap(Map<String,Object> result,
Map<String,Object> dataMap,
String parentKey) |
List<org.springframework.core.env.PropertySource<?>> |
load(String name,
org.springframework.core.io.Resource resource)
Load the resource into one or more property sources.
|
protected boolean canLoad(String name, org.springframework.core.io.Resource resource)
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 loadpublic List<org.springframework.core.env.PropertySource<?>> load(String name, org.springframework.core.io.Resource resource) throws IOException
load in interface org.springframework.boot.env.PropertySourceLoadername - 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 loadIOException - if the source cannot be loadedprotected abstract List<org.springframework.core.env.PropertySource<?>> doLoad(String name, org.springframework.core.io.Resource resource) throws IOException
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 loadIOException - if the source cannot be loadedCopyright © 2023 Pivotal Software, Inc.. All rights reserved.