SSM项目使用idea运行配置及打war包
1.下拉代码
SVN Checkout
2.用idea打开
点击idea点击open打开项目
3.项目配置
1.打开project structure
2.点击进入module配置项,add-->new module-->添加spring-->目录选择项目根目录-->点击finish
3.点击进入module配置项,add-->new module-->添加web
4.module配置项web的配置-->web resource directory path-->选择webRoot(或者webapp)-->点击create Artifact添加Artifact
5.点击进入librares配置项,add-->java-->添加项目中自带的lib包(可能路径在项目根目录或者webapp里面)-->点击problems-->点击fix将lib同时add到Artifact(或者点击Artifact-->WEB-INFo-->点击lib-->点加号手动添加lib包)
6.点击facets-->点击spring-->点加号-->添加Spring Application Context-->全选并点击finish
7.Edit configcuations添加一个本地的tomcat.
8.点击进入module配置项-->点击项目名称-->更换SDK配置项-->点击加号-->点击librares-->添加tomcat依赖-->点击finish
9.点击进入module配置项-->点击项目名称-->选中resources和src,然后点击Sources;
10.点击file-->settings-->搜索maven-->更换maven配置为本地安装的maven
11.module配置项web的配置-->web-->Web module deployment Descripter-->点击更换web.xml的路径为项目路径(可能路径在webapp里面的WEB-INFO下面的web.xml)
12.点击更换项目的编译路径-->project最后一行project compiler output
4.项目运行
1.点击Edit Configurations-->点击加号-->tomcat server-->local
2.Deployment添加Artifact,若有需要,可改Application Context
3.点击运行
5.打war包
1.点击进入Artifact-->add-->web application:Archive-->For:项目名:war_exploded
2.Build-->build Artifacts--项目名:war-->build