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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user