Auto-Configuration for Cassandra does not back off if a custom ReactiveSessionFactory is defined #21741
Closed
4 tasks done
Labels
status: first-timers-only
An issue that can only be worked on by brand new contributors
status: superseded
An issue that has been superseded by another
type: bug
A general bug
Hi, this is a
first-timers-only
issue. This means we've worked to make it more legible to folks who either haven't contributed to our codebase before, or even folks who haven't contributed to open source before.If that's you, we're interested in helping you take the first step and can answer questions and help you out as you do. Note that we're especially interested in contributions from people from groups underrepresented in free and open source software!
If you have contributed before, consider leaving this one for someone new, and looking through our general
ideal-for-contribution
issues. Thanks!Problem
The auto-configuration for Cassandra defines a
ReactiveSessionFactory
but does not check if the user has configured its own. The lack of check also means that the auto-configuration would potentially overrides the user's decision. Since Spring Boot works by default with bean overriding disabled, creating your ownReactiveSessionFactory
leads to:Solution
The bean definition for
reactiveCassandraSessionFactory
should have a@ConditionalOnMissingBean
so that it is not created if a bean of that type already exists.Steps to Fix
The text was updated successfully, but these errors were encountered: