Skip to content

Commit

Permalink
Don't create unessary JMX beans
Browse files Browse the repository at this point in the history
Align "spring.jmx.enabled" conditions by removing
`matchIfMissing = true`.

Closes gh-43706
  • Loading branch information
philwebb committed Jan 8, 2025
1 parent 7e194a0 commit b448d5e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public SimpleAsyncTaskScheduler taskSchedulerVirtualThreads(
@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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
* @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);
Expand Down

0 comments on commit b448d5e

Please sign in to comment.