Your idea is wrong. The configuration in your pom is the configured maven plug-in. Do you want to execute it on your server maven tomcat:run? Maven should not be installed on your server, right?
What you need to adjust is the server.xml file of the tomcat you are running on the server,
This thing should be restricted directly from the server. Why do it need to be done in tomcat
The fixed IP is the IP of your machine
Your idea is wrong. The configuration in your pom is the configured maven plug-in.
Do you want to execute it on your server
maven tomcat:run
? Maven should not be installed on your server, right?What you need to adjust is the
server.xml
file of the tomcat you are running on the server,In
<Engine>
里面新添加一个<host>
, like this: