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

一个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

你可能感兴趣的:(bug)