FileSystemDynamicConfiguration extends TreePathDynamicConfiguration { protected String getConfig(File configFile) { return ThrowableFunction.execute(configFile, file -> canRead(configFile) ? readFileToString(configFile, getEncoding()) : null); } FileSystemDynamicConfiguration();  FileSystemDynamicConfiguration(File rootDirectory);  FileSystemDynamicConfiguration(File rootDirectory, String encoding);  FileSystemDynamicConfiguration(File rootDirectory, String encoding, String threadPoolPrefixName);  FileSystemDynamicConfiguration(File rootDirectory, String encoding, String threadPoolPrefixName,
                                          int threadPoolSize);  FileSystemDynamicConfiguration(File rootDirectory, String encoding,
                                          String threadPoolPrefixName,
                                          int threadPoolSize,
                                          long keepAliveTime);  FileSystemDynamicConfiguration(URL url); File configFile(String key, String group); @Override Object getInternalProperty(String key); Set<String> getConfigGroups(); File getRootDirectory(); String getEncoding(); static final String CONFIG_CENTER_DIR_PARAM_NAME; static final String CONFIG_CENTER_ENCODING_PARAM_NAME; static final String DEFAULT_CONFIG_CENTER_DIR_PATH; static final int DEFAULT_THREAD_POOL_SIZE; static final String DEFAULT_CONFIG_CENTER_ENCODING; }
@Test public void testPublishAndGetConfig() { assertTrue(configuration.publishConfig(KEY, CONTENT)); assertTrue(configuration.publishConfig(KEY, CONTENT)); assertTrue(configuration.publishConfig(KEY, CONTENT)); assertEquals(CONTENT, configuration.getConfig(KEY, DEFAULT_GROUP)); }