Update Cassandra auto-configuration so that beans in CassandraAutoConfiguration may be optionally created

Comment From: pivotal-cla

@jeffreye Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

Comment From: pivotal-cla

@jeffreye Thank you for signing the Contributor License Agreement!

Comment From: snicoll

@jeffreye thanks for the PR but we need to take a step back. Rather than offering what you think is a solution to the problem you're experiencing, we'd prefer a description of the problem first. I don't think the cassandra auto-config should be conditional on spring.cassandra.keyspace-name.

Comment From: jeffreye

  1. We would like to use Cassandra driver with our own implementation instead of auto-configured bean. Without configuring spring properties, it will fail the startup currently or we have to exclude the autoconfiguration
  2. CouchbaseAutoConfiguration also has the similar conditions so that it won't create beans unless there is properties

If keyspace name is not a good choice, what is your recommendation?

Comment From: wilkinsona

This proposal appears to be a possible solution to one part of https://github.com/spring-projects/spring-boot/issues/11325. Unfortunately, until we've agreed upon the desired default connection behavior, I'm not in favor of making any changes for a specific store as those changes might move things in the wrong direction.

Comment From: jeffreye

Thanks for the info. I'll vote +1 for the issue and hope it could bring more attention to the team.

Comment From: snicoll

Indeed, so let's close this one in favor of #11325. Thanks for the suggestion, in any case.