diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cassandra/CassandraAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cassandra/CassandraAutoConfiguration.java index 9664fd883a5..ac414ef5cf3 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cassandra/CassandraAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cassandra/CassandraAutoConfiguration.java @@ -83,7 +83,7 @@ public class CassandraAutoConfiguration { map.from(properties::getContactPoints) .as((list) -> StringUtils.toStringArray(list)) .to(builder::addContactPoints); - map.from(properties::isJmxReporting).whenFalse() + map.from(properties::isJmxEnabled).whenFalse() .toCall(builder::withoutJMXReporting); customize(builder); return builder.build(); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cassandra/CassandraProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cassandra/CassandraProperties.java index 911c8c2c617..21335a9cfaa 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cassandra/CassandraProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cassandra/CassandraProperties.java @@ -133,10 +133,10 @@ public class CassandraProperties { private boolean ssl = false; /** - * If JMX reporting should be enabled. Default to false as Cassandra JMX reporting is - * not compatible with Dropwizrd Metrics 4. + * Whether to enable JMX reporting. Default to false as Cassandra JMX reporting is not + * compatible with Dropwizard Metrics. */ - private boolean jmxReporting = false; + private boolean jmxEnabled; /** * Pool configuration. @@ -278,12 +278,12 @@ public class CassandraProperties { this.ssl = ssl; } - public boolean isJmxReporting() { - return this.jmxReporting; + public boolean isJmxEnabled() { + return this.jmxEnabled; } - public void setJmxReporting(boolean jmxReporting) { - this.jmxReporting = jmxReporting; + public void setJmxEnabled(boolean jmxEnabled) { + this.jmxEnabled = jmxEnabled; } public String getSchemaAction() { diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc index bfe4f0fa5d7..0e690de9d02 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -637,6 +637,7 @@ content into your application. Rather, pick only the properties that you need. spring.data.cassandra.consistency-level= # Queries consistency level. spring.data.cassandra.contact-points=localhost # Cluster node addresses. spring.data.cassandra.fetch-size= # Queries default fetch size. + spring.data.cassandra.jmx-enabled=false # Whether to enable JMX reporting. spring.data.cassandra.keyspace-name= # Keyspace name to use. spring.data.cassandra.port= # Port of the Cassandra server. spring.data.cassandra.password= # Login password of the server.