Commit d64cc082 authored by Stephane Nicoll's avatar Stephane Nicoll

Harmonize property name

The property default format is lower case using hyphen. The JMX default
domain property has been harmonized to that format.

Fixes gh-2427
parent c346e996
......@@ -30,7 +30,7 @@ import org.springframework.util.StringUtils;
@ConfigurationProperties(prefix = "endpoints.jmx")
public class EndpointMBeanExportProperties {
@Value("${spring.jmx.default_domain:}")
@Value("${spring.jmx.default-domain:}")
private String domain;
private boolean uniqueNames = false;
......
......@@ -52,7 +52,7 @@ public class IntegrationAutoConfiguration {
@ConditionalOnClass(EnableIntegrationMBeanExport.class)
@ConditionalOnMissingBean(value = IntegrationMBeanExporter.class, search = SearchStrategy.CURRENT)
@ConditionalOnExpression("${spring.jmx.enabled:true}")
@EnableIntegrationMBeanExport(defaultDomain = "${spring.jmx.default_domain:}", server = "${spring.jmx.server:mbeanServer}")
@EnableIntegrationMBeanExport(defaultDomain = "${spring.jmx.default-domain:}", server = "${spring.jmx.server:mbeanServer}")
protected static class IntegrationJmxConfiguration {
}
......
......@@ -92,7 +92,7 @@ public class JmxAutoConfigurationTests {
public void testDefaultDomainConfiguredOnMBeanExport() {
MockEnvironment env = new MockEnvironment();
env.setProperty("spring.jmx.enabled", "true");
env.setProperty("spring.jmx.default_domain", "my-test-domain");
env.setProperty("spring.jmx.default-domain", "my-test-domain");
this.context = new AnnotationConfigApplicationContext();
this.context.setEnvironment(env);
this.context.register(TestConfiguration.class, JmxAutoConfiguration.class);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment