没有合适的资源?快使用搜索试试~ 我知道了~
首页IntelliJ IDEA使用maven实现tomcat的热部署
资源详情
资源评论
资源推荐

IntelliJ IDEA使用使用maven实现实现tomcat的热部署的热部署
主要介绍了IntelliJ IDEA使用maven实现tomcat的热部署,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
在tomcat的conf目录 tomcat-users.xml配置以下内容(<tomcat-users>标签内</tomcat-users>),用于部署:
<role rolename="manager"/>
<role rolename="manager-gui"/>
<role rolename="admin"/>
<role rolename="admin-gui"/>
<role rolename="manager-script"/>
<user username="tomcat" password="tomcat" roles="admin-gui,admin,manager-gui,manager,manager-script"/
启动tomcat,访问 http:ip:8080/manager 验证tomcat用户是否配置成功
在maven工程的pom.xml中配置插件
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<configuration>
<port>8080</port>
<path>/mvc</path>
<url>http://192.168.43.128:8080/manager/text</url>
<username>tomcat</username>
<password>tomcat</password>
</configuration>
</plugin>
运行配置
点击Run-->Edit Configurations
点击+号,选择Maven ,
输入信息
Name 给运行配置取的名称
Working directory(工程目录)
Command line 命令 tomcat7:deploy 或 tomcat7:redeploy
点击确定,保存。

















安全验证
文档复制为VIP权益,开通VIP直接复制

评论0