That’s what they show you.

Both of these projects are Spring Boot projects, one of which was copied from the other with minor modifications. But the name of the project has changed. Look at application.properties(YML), there is no duplicate ID either.

Searching for answers on the Web, it’s almost always about changing web.xml. But the Spring Boot project doesn’t have that. So there’s talk of changing the code and adding something like webAppRootKey, but Spring Boot is all about simplicity, and this is the opposite. It’s definitely not that complicated. Then I saw an article that said to set up spring. JMX:

In application. Properties (YML)

spring.jmx.default-domain=project1

spring.jmx.default-domain=project2
Copy the code

To ensure that the domains are different.

Processing according to law, the problem solved. JMX, Java Management Extensions, is a framework for embedding Management capabilities into applications, devices, systems, and so on. Spring Boot’s Spring.jmx resource management is turned on by default, and using both projects at the same time can conflict.

Reference article: Multiple Spring Boot projects deployed in a Tomcat container cannot start