IDEA使用Maven+Tomcat插件实现热部署


1 配置tomcat

pom.xml

1 <!-- tomcat7启动插件 -->
2 <plugin>
3     <groupId>org.apache.tomcat.maven</groupId>
4     <artifactId>tomcat7-maven-plugin</artifactId>
5     <version>2.2</version>
6     <configuration>
7         <path>/${project.artifactId}</path>
8     </configuration>
9 </plugin>

2 添加maven configuration

3 使用debug启动项目, 请务必使用debug的方式启动

4 访问资源

5 实现热部署

6 刷新页面,无需重启服务器

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM