maven tomcat结合,热部署,调试
1。加入插件:<plugin><groupId>org.codehaus.mojo</groupId><artifactId>tomcat-maven-plugin</artifactId><configuration><port>9009</port><path>/qc</path></configuration></plugin>
2。创建启动程序
Location 选择本机的mvn命令地址。
Arguments 输入 tomcat:run
在Environment中,加入环境变量:
MAVEN_OPTS = -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,suspend=n,server=y -Xms256m -Xmx512m -XX:MaxPermSize=128m
其中,8787为监听地址,后面用到。
3。debug
在post中,输入刚刚输入的8787
OVER!~~~
大功告成。现在先运行run as 在运行 debug as。。。。
就可以调试程序了。
页:
[1]