Can I have two (or more) Spring-boot applications running on one Tomcat?
I have two applications packaged as war
files and I would like to run them on o
As Spring Boot Reference says:
If your application contains more than one Spring ApplicationContext you may find that names clash. To solve this problem you can set the endpoints.jmx.uniqueNames property to true so that MBean names are always unique.
endpoints.jmx.domain=myapp
endpoints.jmx.uniqueNames=true
spring.jmx.default-domain=app-name
spring.jmx.unique-names=true
Similar to @Maciej answer. An alternative is to set the following
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
Worked for me on Spring boot 1.5.9.RELEASE