Class AstraSpringAutoConfiguration

java.lang.Object
com.datastax.astra.boot.AstraSpringAutoConfiguration

@Configuration @ConditionalOnClass(AstraClient.class) @EnableConfigurationProperties(AstraClientProperties.class) public class AstraSpringAutoConfiguration 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 explicitely.
Author:
Cedrick LUNVEN (@clunven)
  • Constructor Details

    • AstraSpringAutoConfiguration

      public AstraSpringAutoConfiguration()
  • Method Details

    • astraClient

      @Bean @ConditionalOnMissingBean public AstraClient 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 by AstraClient.
      Parameters:
      astraClient - astraClient
      Returns:
      the ccassandra session