tomcat默认端口是8080,如果想修改默认端口,可以有两种方法:

1.在pom.xml里修改

maven tomcat启动时修改默认端口

maven tomcat启动时修改默认端口

2.在Run Configurations修改启动方式,加上-Dmaven.tomcat.port=端口号

maven tomcat启动时修改默认端口

tomcat有两种插件,tomcat-maven-plugin 和tomcat7-maven-plugin ,当用tomcat插件,Goals里用tomcat:run,如果用的tomcat7插件,Goals则用tomcat7:run,这两种不能混用,不然在pom.xml改了默认端口就不会生效

相关文章:

  • 2021-12-15
  • 2022-01-10
  • 2021-09-23
  • 2021-12-05
  • 2021-12-30
  • 2021-10-29
猜你喜欢
  • 2021-11-19
  • 2021-09-06
  • 2021-09-30
  • 2021-12-15
  • 2021-09-26
相关资源
相似解决方案