NacosDynamicConfiguration implements DynamicConfiguration { @Override public SortedSet<String> getConfigKeys(String group) { SortedSet<String> keys = new TreeSet<>(); try { List<String> paramsValues = asList( "search", "accurate", "dataId", "", "group", resolveGroup(group), "pageNo", "1", "pageSize", String.valueOf(Integer.MAX_VALUE) ); String encoding = getProperty(ENCODE, "UTF-8"); HttpSimpleClient.HttpResult result = httpAgent.httpGet(GET_CONFIG_KEYS_PATH, emptyList(), paramsValues, encoding, 5 * 1000); Stream<String> keysStream = toKeysStream(result.content); keysStream.forEach(keys::add); } catch (IOException e) { if (logger.isErrorEnabled()) { logger.error(e.getMessage(), e); } } return keys; } NacosDynamicConfiguration(URL url); @Override void addListener(String key, String group, ConfigurationListener listener); @Override void removeListener(String key, String group, ConfigurationListener listener); @Override String getConfig(String key, String group, long timeout); @Override Object getInternalProperty(String key); @Override boolean publishConfig(String key, String group, String content); @Override long getDefaultTimeout(); @Override SortedSet<String> getConfigKeys(String group); @Override boolean removeConfig(String key, String group);  }
@Test public void testGetConfigKeys() { put("key1", "a"); put("key2", "b"); SortedSet<String> keys = config.getConfigKeys(DynamicConfiguration.DEFAULT_GROUP); Assertions.assertFalse(keys.isEmpty()); }