Class MapConfigurationSource

All Implemented Interfaces:
ConfigurationSource<AbstractHashConfigurationSource.HashConfigurationQuery<Object,MapConfigurationSource>,AbstractHashConfigurationSource.HashExecutableConfigurationQuery<Object,MapConfigurationSource>,AbstractHashConfigurationSource.HashListConfigurationQuery<Object,MapConfigurationSource>>, DefaultableConfigurationSource<AbstractHashConfigurationSource.HashConfigurationQuery<Object,MapConfigurationSource>,AbstractHashConfigurationSource.HashExecutableConfigurationQuery<Object,MapConfigurationSource>,AbstractHashConfigurationSource.HashListConfigurationQuery<Object,MapConfigurationSource>,MapConfigurationSource>

public class MapConfigurationSource extends AbstractHashConfigurationSource<Object,MapConfigurationSource>

A configuration source that looks up properties from a map.

This source supports parameterized configuration properties defined as follows:


 Map<String, Object> map = Map.of(
     "web.server_port", 8080,
     "db.url[env=\"dev\"]", "jdbc:oracle:thin:@dev.db.server:1521:sid",
     "db.url[env=\"prod\",zone=\"eu\"]", "jdbc:oracle:thin:@prod_eu.db.server:1521:sid",
     "db.url[env=\"prod\",zone=\"eu\"]", "jdbc:oracle:thin:@prod_eu.db.server:1521:sid",
     "db.url[env=\"prod\",zone=\"us\"]", "jdbc:oracle:thin:@prod_us.db.server:1521:sid"
 );
 
Since:
1.0
Author:
Jeremy Kuhn
See Also: