Skip to content
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

CassandraDataAutoConfiguration's constructor should not require a CqlSession connection #40090

Closed
tmoschou opened this issue Mar 25, 2024 · 1 comment
Labels
status: invalid An issue that we don't feel is valid

Comments

@tmoschou
Copy link

tmoschou commented Mar 25, 2024

The constructor for CassandraDataAutoConfiguration requires a CqlSession connection (provided in CassandraAutoConfiguration) whether used or not. This should be better provided through @Bean method injection which are behind a @ConditionalOnMissingBean.

This means that applications with Cassandra libraries on the Classpath will automatically require a connection by default even when not used, and will fail to boot if a connection cannot be established.

Using Spring Boot 3.2.3

Relates to #11325

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 25, 2024
@tmoschou
Copy link
Author

Ah realised that solution is still not quite right as the beans making use of CqlSession are by default not lazy initialized, unlike CqlSession itself. Feel free to close this ticket.

@mhalbritter mhalbritter closed this as not planned Won't fix, can't repro, duplicate, stale Mar 25, 2024
@mhalbritter mhalbritter added status: invalid An issue that we don't feel is valid and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

3 participants