【问题标题】:Multiple SpringBoot apps with same data source具有相同数据源的多个 Spring Boot 应用程序
【发布时间】:2018-01-28 10:39:16
【问题描述】:

我在同一个 tomcat 上部署了两个 Spring Boot 应用程序,并且两个应用程序具有相同的数据源。

I get InstanceAlreadyExistsException: org.apache.tomcat.jdbc.pool.jmx:name=dataSourceMBean,type=Co‌​nnectionPool . 

我已经设置好了

endpoints.jmx.domain=myapp
endpoints.jmx.uniqueNames=true。

但我仍然收到错误消息。任何建议

【问题讨论】:

    标签: spring tomcat spring-boot


    【解决方案1】:
    This is how I could solve the problem.
    

    https://github.com/spring-cloud/spring-cloud-config/issues/118

    endpoints.jmx.domain=dev
    endpoints.jmx.unique-names=true
    spring.jmx.default-domain=dev
    spring.application.name=dev
    
    
    
    
    
    endpoints.jmx.domain=dev2
     endpoints.jmx.unique-names=true
     spring.jmx.default-domain=dev2
     spring.application.name=dev2
    

    【讨论】:

      猜你喜欢
      • 2016-10-23
      • 2015-07-10
      • 2016-08-27
      • 2014-12-06
      • 2015-11-11
      • 2015-05-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多