Skip to content

Instantly share code, notes, and snippets.

@civitaspo
Created November 29, 2019 01:08
Show Gist options
  • Save civitaspo/855798b6a36b0e008009895f84f37ede to your computer and use it in GitHub Desktop.
Save civitaspo/855798b6a36b0e008009895f84f37ede to your computer and use it in GitHub Desktop.
HashMap<String, String> map = Maps.newHashMap();
systemConfig
.getKeys()
.stream()
.filter((key) ->
key.startsWith("database.jdbc.")
)
.forEach((key) ->
map.put(key.replace("database.jdbc.", ""), systemConfig.get(key, String.class))
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment