Skip to content

Instantly share code, notes, and snippets.

@dkirrane
Last active August 29, 2015 14:14
Show Gist options
  • Save dkirrane/b9f30b96567f8c225e80 to your computer and use it in GitHub Desktop.
Save dkirrane/b9f30b96567f8c225e80 to your computer and use it in GitHub Desktop.
DeltaSpike Custom ConfigSource
#####
# http://deltaspike.apache.org/documentation/configuration.html#_custom_configsources
#####
# ConfigSources are picked up using the `java.util.ServiceLoader’ mechanism so follow steps below to add a Custom one:
# 1. Create a file named:
/META-INF/services/org.apache.deltaspike.core.spi.config.ConfigSource
# 2. Implement the Interface ConfigSource http://deltaspike.apache.org/javadoc/1.2.1/org/apache/deltaspike/core/spi/config/ConfigSource.html
public ConfigSource implements ConfigSource {
Map<String,String> getProperties() {...}
}
# 3. Add the FQDN name of the implementaion class to file from step 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment