【Intellij IDEA】导入eclipse项目以及Tomacat的部署

 

 一、导入eclipse项目

1.选择import project,选择项目路径,选择eclipse

【Intellij IDEA】导入eclipse项目以及Tomacat的部署【Intellij IDEA】导入eclipse项目以及Tomacat的部署

2.一直next,直到配置jdk,选择jdk位置,点击finish

【Intellij IDEA】导入eclipse项目以及Tomacat的部署

3.配置jar包,file>Project Structure(或者直接点击该图标【Intellij IDEA】导入eclipse项目以及Tomacat的部署)

【Intellij IDEA】导入eclipse项目以及Tomacat的部署

4.点击modules,选择Dependencies,红色部分remove,sdk换成自己的

【Intellij IDEA】导入eclipse项目以及Tomacat的部署

5.点击+选择jar or...,选择项目中的jar包所在位置(和eclipse一样,选择所有jar包点击ok),一般在lib下面添加jar依赖

【Intellij IDEA】导入eclipse项目以及Tomacat的部署【Intellij IDEA】导入eclipse项目以及Tomacat的部署

 

6.点击 + 选择web,进行web框架配置;选择项目的web.xml文件路径(绿色铅笔修改);

【Intellij IDEA】导入eclipse项目以及Tomacat的部署【Intellij IDEA】导入eclipse项目以及Tomacat的部署

【Intellij IDEA】导入eclipse项目以及Tomacat的部署
选择web.xml路径

 

 

 

然后选择web文件所在位置,我的在webRoot下面;“Web”Facet resources are not included in an artifact,然后点击Create Artifact进行创建,这是创建好的Artifact;选择右边项目右键选择put into out root,没有任何错误提示就点击ok

【Intellij IDEA】导入eclipse项目以及Tomacat的部署【Intellij IDEA】导入eclipse项目以及Tomacat的部署

二、Tomcat的配置

1.选择【Intellij IDEA】导入eclipse项目以及Tomacat的部署,或者点击run Edit Configuration...,点击 + ,选择tomcat server>local,;若没有tomcat选项,file>settings>Plugins,搜索tomcat然后勾选上即可;有可能最下面会出现Warring:no artifact...,点击fix然后选择之前创建的artifact就可以了

【Intellij IDEA】导入eclipse项目以及Tomacat的部署【Intellij IDEA】导入eclipse项目以及Tomacat的部署【Intellij IDEA】导入eclipse项目以及Tomacat的部署【Intellij IDEA】导入eclipse项目以及Tomacat的部署