Protect against duplicate datasource MBeans

See gh-1590
pull/1783/merge
Phillip Webb 10 years ago
parent a973fd41f4
commit 43c07e8b44

@ -148,6 +148,7 @@ public class DataSourceAutoConfiguration {
@ConditionalOnProperty(prefix = "spring.datasource", name = "jmx-enabled", havingValue = "true", matchIfMissing = true)
@ConditionalOnClass(name = "org.apache.tomcat.jdbc.pool.DataSourceProxy")
@Conditional(DataSourceAutoConfiguration.DataSourceAvailableCondition.class)
@ConditionalOnMissingBean(name = "dataSourceMBean")
protected static class TomcatDataSourceJmxConfiguration {
@Bean

Loading…
Cancel
Save