Don't create unessary JMX beans

Align "spring.jmx.enabled" conditions by removing
`matchIfMissing = true`.

Closes gh-43706
This commit is contained in:
Phillip Webb
2025-01-08 13:45:01 -08:00
parent 7e194a0af6
commit b448d5e0a7
2 changed files with 2 additions and 2 deletions

View File

@@ -205,7 +205,7 @@ public class IntegrationAutoConfiguration {
@ConditionalOnClass(EnableIntegrationMBeanExport.class)
@ConditionalOnMissingBean(value = IntegrationMBeanExporter.class, search = SearchStrategy.CURRENT)
@ConditionalOnBean(MBeanServer.class)
@ConditionalOnBooleanProperty(name = "spring.jmx.enabled", matchIfMissing = true)
@ConditionalOnBooleanProperty("spring.jmx.enabled")
protected static class IntegrationJmxConfiguration {
@Bean

View File

@@ -43,7 +43,7 @@ import org.springframework.jmx.export.MBeanExporter;
* @author Stephane Nicoll
*/
@Configuration(proxyBeanMethods = false)
@ConditionalOnBooleanProperty(name = "spring.jmx.enabled", matchIfMissing = true)
@ConditionalOnBooleanProperty("spring.jmx.enabled")
class DataSourceJmxConfiguration {
private static final Log logger = LogFactory.getLog(DataSourceJmxConfiguration.class);