Package com.datastax.astra.boot.utils
Class DataStaxDriverSpringConfig
java.lang.Object
com.datastax.astra.boot.utils.DataStaxDriverSpringConfig
Configuration Object.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiondriverConfigFromSpring(org.springframework.core.env.ConfigurableEnvironment env) Mapthat holds all driver configuration properties that have been set through a Spring properties mechanism.static StringmapAsTypeSafe(String key) Converts a given key to one that can be used for backing a TypeSafeConfig.
- 
Constructor Details- 
DataStaxDriverSpringConfigpublic DataStaxDriverSpringConfig()
 
- 
- 
Method Details- 
driverConfigFromSpringpublic static Map<String,String> driverConfigFromSpring(org.springframework.core.env.ConfigurableEnvironment env) Mapthat holds all driver configuration properties that have been set through a Spring properties mechanism. These can come from a properties file (or YAML or XML file), system properties, or some other mechanism by which Spring initializes properties.- Parameters:
- env- current environment
- Returns:
- Mapobject with driver-related configuration property values.
 
- 
mapAsTypeSafeConverts a given key to one that can be used for backing a TypeSafeConfig.For TypeSafe, list elements in a properties file are expected to be denoted by a property name that has an index appended as a path element. In a Spring properties file (or YML file), a list element, when converted to a String key, is represented by the key name followed by an index in square brackets. For example, if you have a property key called myListwith 2 values in a list, Spring would yield the following two properties:myList[0]=value1 myList[1]=value2 TypeSafe wants them to look like this: myList.0=value1 myList.1=value2 This method converts any property key for list values form the way Spring builds them into the way TypeSafe expects them. - Parameters:
- key- a Java map key the way Spring would create from various Spring PropertySources.
- Returns:
- a Java map key the way TypeSafe can parse them.
 
 
-