Package com.datastax.astra.boot
Class AstraSpringBoot3AutoConfiguration
java.lang.Object
com.datastax.astra.boot.AstraSpringBoot3AutoConfiguration
@AutoConfiguration
@ConditionalOnClass(AstraClient.class)
@EnableConfigurationProperties(AstraClientProperties.class)
public class AstraSpringBoot3AutoConfiguration
extends Object
Initializing AstraClient (if class present in classpath)
- #1 Configuration with application.properties
- #2 Configuration with environment variables
- #3 Configuration with AstraRC on file system in user.home
You can also define your
AstraClient
expli`citely.- Author:
- Cedrick LUNVEN (@clunven)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAcessing astra client.com.datastax.oss.driver.api.core.CqlSession
cqlSession
(AstraClient astraClient) We want the CqlSession generated byAstraClient
.
-
Constructor Details
-
AstraSpringBoot3AutoConfiguration
public AstraSpringBoot3AutoConfiguration()
-
-
Method Details
-
astraClient
Acessing astra client.- Returns:
- astra client
-
cqlSession
@Bean @ConditionalOnProperty(prefix="astra.cql", name="enabled", havingValue="true") public com.datastax.oss.driver.api.core.CqlSession cqlSession(AstraClient astraClient) We want the CqlSession generated byAstraClient
.- Parameters:
astraClient
- astraClient- Returns:
- the ccassandra session
-