Skip to content

Commit b448d5e

Browse files
committed
Don't create unessary JMX beans
Align "spring.jmx.enabled" conditions by removing `matchIfMissing = true`. Closes gh-43706
1 parent 7e194a0 commit b448d5e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/integration/IntegrationAutoConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ public SimpleAsyncTaskScheduler taskSchedulerVirtualThreads(
205205
@ConditionalOnClass(EnableIntegrationMBeanExport.class)
206206
@ConditionalOnMissingBean(value = IntegrationMBeanExporter.class, search = SearchStrategy.CURRENT)
207207
@ConditionalOnBean(MBeanServer.class)
208-
@ConditionalOnBooleanProperty(name = "spring.jmx.enabled", matchIfMissing = true)
208+
@ConditionalOnBooleanProperty("spring.jmx.enabled")
209209
protected static class IntegrationJmxConfiguration {
210210

211211
@Bean

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceJmxConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
* @author Stephane Nicoll
4444
*/
4545
@Configuration(proxyBeanMethods = false)
46-
@ConditionalOnBooleanProperty(name = "spring.jmx.enabled", matchIfMissing = true)
46+
@ConditionalOnBooleanProperty("spring.jmx.enabled")
4747
class DataSourceJmxConfiguration {
4848

4949
private static final Log logger = LogFactory.getLog(DataSourceJmxConfiguration.class);

0 commit comments

Comments
 (0)