idea中运行ssm 或springboot项目时,project Structure的配置

ctrl+alt+shift+s进入 project Structure

首先是project选项

 

 

Modules

标明source testsource 以及 resource 和 testresource

 

 

 

 

这是自动生成的

 

注意这里需要选择到webapp 否则 webApp的内容不会被输出到output的路径

 

 

facets

 

 

 

 

 

artifacts

首先创建一个from modules 的 exploded版本

然后创建from exploded的 Archive版本

 

指定output directory

 

 

然后配置tomcat ,选择war包即可

 

 

如果遇到了 404 的情况,请在右侧执行 plugins中的 clean 和install

如果在执行install的时候报错The packaging for this project did not assign a file to the build artifact

请执行lifecycle中的install

其实lifecycle是maven中一个十分完善的生命周期模型,所以使用Lifecycle中的install项目就会自动去maven仓库下载需要的包.

==============================================================================================

部署成功,这样就可以成功访问你的项目

 

posted @ 2018-06-09 17:29  宇宙间的星河集  阅读(1098)  评论(0编辑  收藏  举报