-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to configure Datastax Astra using AbstractCassandraConfiguration
#1447
Comments
If you want to build a configuration that is robust against Cassandra absence, then you cannot:
You also need to provide a |
Thanks but I want to ask if this works. I looked at how spring boot configures CqlSession for Astra Db. There is @Bean
public CqlSessionBuilderCustomizer sessionBuilderCustomizer(DataStaxAstraProperties astraProperties) {
Path bundle = astraProperties.getSecureConnectBundle().toPath();
return builder -> builder.withCloudSecureConnectBundle(bundle);
} Almost same identical code exists in normal spring data cassandra. in public class ReactiveCassandraConfig extends AbstractReactiveCassandraConfiguration {
private String keySpace;
private String connectBundlePath;
@Override
protected String getKeyspaceName() {
return keySpace;
}
@Override
protected SessionBuilderConfigurer getSessionBuilderConfigurer() {
return sessionBuilder -> sessionBuilder
.withCloudSecureConnectBundle(Path.of(connectBundlePath));
}
} |
AbstractCassandraConfiguration
Sorry, I misunderstood your question and now that you've posted some code, it made it clear what you're asking for. So It makes sense to document |
Hi, I have an app that is using spring(not spring boot) that requires to connect to Datastax Astra DB. There is a solution in case spring boot is available. but that is not an option for me and I couldn't find out how to do this via AbstractReactiveCassandraConfiguration. Thanks in advance.
The text was updated successfully, but these errors were encountered: