Commit be835dd6 by Nepxion

增加Nacos的naming-load-cache-at-start配置项

parent 5f0d2d36
......@@ -76,6 +76,11 @@ public class NacosAutoConfiguration {
properties.put(NacosConstant.ENCODE, encode);
}
String namingLoadCacheAtStart = environment.getProperty(NacosConstant.NACOS_PLUGIN_NAMING_LOAD_CACHE_AT_START);
if (StringUtils.isNotEmpty(namingLoadCacheAtStart)) {
properties.put(NacosConstant.NAMING_LOAD_CACHE_AT_START, namingLoadCacheAtStart);
}
return NacosFactory.createConfigService(properties);
}
......
......@@ -21,6 +21,7 @@ public class NacosConstant extends PropertyKeyConst {
public static final String NACOS_PLUGIN_CONTEXT_PATH = "nacos.plugin.context-path";
public static final String NACOS_PLUGIN_ENDPOINT = "nacos.plugin.endpoint";
public static final String NACOS_PLUGIN_ENCODE = "nacos.plugin.encode";
public static final String NACOS_PLUGIN_NAMING_LOAD_CACHE_AT_START = "nacos.plugin.naming-load-cache-at-start";
public static final String NACOS_PLUGIN_TIMEOUT = "nacos.plugin.timout";
public static final long DEFAULT_TIMEOUT = 30000;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment