Multiple Spring-boot applications running on one Tomcat

后端 未结 3 1358
长情又很酷
长情又很酷 2020-12-15 00:48

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

3条回答
  •  醉酒成梦
    2020-12-15 01:28

    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

提交回复
热议问题