gpt4 book ai didi

spring - 具有相同数据源的多个 SpringBoot 应用程序

转载 作者:行者123 更新时间:2023-11-28 22:01:15 25 4
gpt4 key购买 nike

我在同一个 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.

但我仍然得到错误。有什么建议

最佳答案

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

关于spring - 具有相同数据源的多个 SpringBoot 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45778735/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com