使用IDEA将普通MAVEN项目转为WEB项目

来源:互联网 发布:px4源码下载 编辑:程序博客网 时间:2024/06/04 23:25

1、file--project Structure--,然后点“+”号,,若没有war包,可修改maven打包方式,为

<packaging>war</packaging>


若为多环境开发,则需修改默认配置文件位置,在pom文件加上

<profiles>    <!-- 开发环境 -->    <profile>        <id>dev</id>        <properties>            <env.type>dev</env.type>        </properties>        <activation>            <activeByDefault>true</activeByDefault>        </activation>    </profile>    <!-- 生产正式环境 -->    <profile>        <id>product</id>        <properties>            <env.type>product</env.type>        </properties>    </profile></profiles>

2、添加tomcate

run--edit Configurations,点“+”号

选择war包添加即可


2 0
原创粉丝点击