Skip to content

Commit 92468d4

Browse files
committed
Merge branch '1.5.x'
2 parents 42c1eb8 + e1f7277 commit 92468d4

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfiguration.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2016 the original author or authors.
2+
* Copyright 2012-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -112,8 +112,9 @@ public CassandraSessionFactoryBean session(CassandraConverter converter)
112112
session.setCluster(this.cluster);
113113
session.setConverter(converter);
114114
session.setKeyspaceName(this.properties.getKeyspaceName());
115-
SchemaAction schemaAction = this.propertyResolver.getProperty("schemaAction",
116-
SchemaAction.class, SchemaAction.NONE);
115+
String name = this.propertyResolver.getProperty("schemaAction",
116+
SchemaAction.NONE.name());
117+
SchemaAction schemaAction = SchemaAction.valueOf(name.toUpperCase());
117118
session.setSchemaAction(schemaAction);
118119
return session;
119120
}

spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfigurationIntegrationTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2016 the original author or authors.
2+
* Copyright 2012-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -72,8 +72,8 @@ public void hasRecreateSchemaActionSet() {
7272
String cityPackage = City.class.getPackage().getName();
7373
AutoConfigurationPackages.register(this.context, cityPackage);
7474
EnvironmentTestUtils.addEnvironment(this.context,
75-
"spring.data.cassandra.schemaAction:RECREATE_DROP_UNUSED",
76-
"spring.data.cassandra.keyspaceName:boot_test");
75+
"spring.data.cassandra.schemaAction=recreate_drop_unused",
76+
"spring.data.cassandra.keyspaceName=boot_test");
7777
this.context.register(CassandraAutoConfiguration.class,
7878
CassandraDataAutoConfiguration.class);
7979
this.context.refresh();

0 commit comments

Comments
 (0)