在使用druid数据源的时候遇到的问题

Violaine 发布于 2017/07/26 17:30
阅读 474
收藏 0

@wenshao 你好,想跟你请教个问题:我遇到问题和下面地址的问题类似https://www.oschina.net/question/1427693_236304

异常发生在:使用druid数据源 和 fastdfs(分布式文件系统) 整合时

报错1:org.springframework.jmx.export.UnableToRegisterMBeanException Unable to register MBean [com.github.tobato.fastdfs.conn.FdfsConnectionPool@4b20aa21] with key 'fdfsConnectionPool';

报错2:

Description:

Constructor in org.springframework.boot.autoconfigure.admin.SpringApplicationAdminJmxAutoConfiguration required a single bean, but 2 were found:
    - mbeanExporter: defined by method 'mbeanExporter' in org.springframework.context.annotation.MBeanExportConfiguration
    - endpointMBeanExporter: defined by method 'endpointMBeanExporter' in class path resource [org/springframework/boot/actuate/autoconfigure/EndpointMBeanExportAutoConfiguration.class]


Action:

Consider marking one of the beans as @Primary , updating the consumer to accept multiple beans, or using @Qualifier to identify the bean that should be consumed

自我分析:在fastdfs里面有用到common-pool2-2.4.2.jar包,是不是和druid数据源 有冲突??@温少 请帮忙解析一下

加载中
返回顶部
顶部