While deploying more than one Spring Boot application in a single Tomcat server means showing exception. How to solve this?
I think what happens when you deploy multiple Spring Boot applications is those apps try to register to jmx on the same jvm using the same name.
Check this issue for the solution https://github.com/spring-cloud/spring-cloud-config/issues/118
Copy-paste from DavidBiesack's solution (regarding
application.properties
orapplication.yaml
)
I was able to solve this by defining the following in my application.properties
spring.application.name=my-app-name
spring.jmx.default-domain=my-app-name
Or for application.yaml
:
spring:
application:
name: my-app-name
jmx:
default-domain: my-app-name