mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Harmonize Cassandra bean names
This commit is contained in:
parent
aefe52e4d0
commit
dee71f064b
@ -63,14 +63,14 @@ public class CassandraAutoConfiguration {
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
@Lazy
|
||||
public CqlSession cqlSession(CqlSessionBuilder cqlSessionBuilder) {
|
||||
public CqlSession cassandraSession(CqlSessionBuilder cqlSessionBuilder) {
|
||||
return cqlSessionBuilder.build();
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
public CqlSessionBuilder cqlSessionBuilder(CassandraProperties properties, DriverConfigLoader driverConfigLoader,
|
||||
ObjectProvider<CqlSessionBuilderCustomizer> builderCustomizers) {
|
||||
public CqlSessionBuilder cassandraSessionBuilder(CassandraProperties properties,
|
||||
DriverConfigLoader driverConfigLoader, ObjectProvider<CqlSessionBuilderCustomizer> builderCustomizers) {
|
||||
CqlSessionBuilder builder = CqlSession.builder().withConfigLoader(driverConfigLoader);
|
||||
configureSsl(properties, builder);
|
||||
builder.withKeyspace(properties.getKeyspaceName());
|
||||
|
@ -96,7 +96,7 @@ public class CassandraDataAutoConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(SessionFactory.class)
|
||||
public SessionFactoryFactoryBean cassandraSession(Environment environment, CassandraConverter converter) {
|
||||
public SessionFactoryFactoryBean cassandraSessionFactory(Environment environment, CassandraConverter converter) {
|
||||
SessionFactoryFactoryBean session = new SessionFactoryFactoryBean();
|
||||
session.setSession(this.session);
|
||||
session.setConverter(converter);
|
||||
|
Loading…
Reference in New Issue
Block a user