IntelliJ Idea Chinese information online relatively few, for the Eclipse project how to import IntelliJ idea also did not complete the explanation, I am here to organize, convenient for more people to join IntelliJ Idea's lineup.
Just go dry!
First, import Eclipse project to Idea
File–new–module from Existing Sources ... Choose your Eclipse Project
This step is the key, choose Eclipse, then directly next next finish will be.
So far, the project has been basically imported successfully, but it also requires some jar and project-related configurations to run in Idea's Tomcat.
Ii. Dependency (Jar package) configuration
Open Project Structure (CTRL + ALT + SHIFT + s), select the modules node to configure projects
Select your project and open the dependencies selector card
Delete the red font package, click on the right side of the minus sign to delete
Add dependencies in your project, click the plus sign on the right, select jars or directories ... Select all the jars under Eclipse Lib
At this point, all dependencies are added to completion. Idea does not automatically help you import newly added jar packages, and if you need to add a jar package, you need to re-import the dependencies to dependencies.
Three, the framework configuration
Or, in the moduls operation, right-click on the project in the middle area to add the configuration of the corresponding program framework.
The more important thing is the Web this option, if the development Web project must add this configuration, to our web. xml and the website root directory to do a configuration
Is it fun to use the hint function of idea? But the fun is based on your perfect configuration, so try to refine your configuration (e.g. spring files) here.
After completing the above steps, the attentive classmate may have found the bottom of the "Web" Facet resources is not included in an artifact
Here are some students do not know what artifact is, in fact, you just to understand it as "generated things", the main thing is to create a "product" of your project for the use of Tomcat release.
Direct click on Create Artifact,idea will automatically generate a base Artifact for you.
The idea is to automatically give me the generated artifact, pay attention to the bottom tells me the lack of ueditor.jar, this is because we did not bring the right jar package into the artifact, directly on the right side of the DDXD project right-click on the selection
Put into output root
After the import is successful (no error prompt, no wavy line, no jar on the right), see if the artifact is exactly the same as the structure we published in Tomcat, so that it can be added to Tomcat to start running.
Four, Tomcat launch
Find this icon in the toolbar of the main interface, which is all your running environment and add a tomcat here.
I've got Tomcat here, so there's no need to select the Tomcat path, and if not, the first red box should have no content, just choose your own tomcat path. Tip: It's a good idea to give ideas a brand new Tomcat,idea that doesn't publish your program to the WebApps directory in Tomcat.
Here is a hint that there is currently no artifact in Tomcat, just click Fix (Multiple prompt selection, a single direct add) will prompt you to choose Artifact, select the artifact we just configured.
Application Context: Is your project access path, Idea here is empty by default, if it is empty you access address: http://localhost:8080/index.jsp, I am here with the project name access:
http://localhost:8080/ddxd/index.jsp
OK, the above is the basic Eclipse Project import idea, start your tomcat to enjoy it!
"IntelliJ Idea" Eclipse Project import