类 AbstractPropertySourceLoader
java.lang.Object
com.alibaba.cloud.nacos.parser.AbstractPropertySourceLoader
- 所有已实现的接口:
org.springframework.boot.env.PropertySourceLoader
public abstract class AbstractPropertySourceLoader
extends Object
implements org.springframework.boot.env.PropertySourceLoader
Nacos-specific loader, If need to support other methods of parsing,you need to do the
following steps:
1.inherit AbstractPropertySourceLoader;
2. define the filespring.factories and append
org.springframework.boot.env.PropertySourceLoader=..;
3.the last step validate.
NacosByteArrayResource .- 作者:
- zkz
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected booleanPrevent interference with other loaders.Nacos-specific loader, unless the reload changes it.protected abstract List<org.springframework.core.env.PropertySource<?>>Load the resource into one or more property sources.protected voidList<org.springframework.core.env.PropertySource<?>>Load the resource into one or more property sources.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.springframework.boot.env.PropertySourceLoader
getFileExtensions
-
构造器详细资料
-
AbstractPropertySourceLoader
public AbstractPropertySourceLoader()
-
-
方法详细资料
-
canLoad
Prevent interference with other loaders.Nacos-specific loader, unless the reload changes it.- 参数:
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- 返回:
- if the resource can be loaded
-
load
public List<org.springframework.core.env.PropertySource<?>> load(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.- 指定者:
load在接口中org.springframework.boot.env.PropertySourceLoader- 参数:
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- 返回:
- a list property sources
- 抛出:
IOException- if the source cannot be loaded
-
doLoad
protected abstract 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.- 参数:
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- 返回:
- a list property sources
- 抛出:
IOException- if the source cannot be loaded
-
flattenedMap
-