同一个tomcat部署多个项目导致启动失败
内容描述
在同一个tomcat部署多个打包成war包的项目导致启动失败,报错如下:
报错信息
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 24-Dec-2018 15:43:04.190 严重 [localhost-startStop-1] org.springframework.boot.SpringApplication.reportFailure Application run failed org.springframework. jmx.export.UnableToRegisterMBeanException: Unable to register MBean [com.alibaba.druid.filter.stat.StatFilter@78f7aca0] with key 'statFilter'; nested exception isjavax.management.InstanceAlreadyExistsException: com.alibaba.druid.filter.stat:name=statFilter,type=StatFilter
解决方案
在项目的的application.properties(yml)文件中配置:
spring.jmx.enabled=false