一个tomcat部署多个springboot项目错误

版权声明:随便转,随便看 https://blog.csdn.net/qq_21780681/article/details/83897887

一个tomcat部署多个springbot项目会出现以下错误:

Caused by: org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [CachingConnectionFactory [channelCacheSize=25, host=[192.168.10.120, port=5672, active=true rabbitConnectionFactory]] with key 'rabbitConnectionFactory'; nested exception is javax.management.InstanceAlreadyExistsException: org.springframework.amqp.rabbit.connection:name=rabbitConnectionFactory,type=CachingConnectionFactory

解决方式:

在springboot配置文件中加入以下配置:
spring.jmx.enabled=false

猜你喜欢

转载自blog.csdn.net/qq_21780681/article/details/83897887