Recently started using idea to write Java projects, which is very popular, much more convenient than eclipse. More functions, relative to the use of the complexity is also higher, because many of the online use and create a project simple tutorial, are based on the old version, each new version has a different line, for the use of small white, this is still difficult to follow this tutorial step-by-step, perhaps because the page is not the same, Perhaps because the entrance is not the same, each of the different will give small white to increase the corresponding difficulty. Because I am not Java Web Development, all for the Java web like me white, plus idea small white, use up a lot of difficulties. Write this is mainly for the convenience of their own, I hope to give those and I the same small white some help it, nonsense not much to say, on dry.
1. For example, after opening idea, file--New project
2. For example, on the new project page that pops up, select Maven, tick create from Artifactype (if not selected, the next step is no way to go), select WebApp (it's worth noting that this place has two apps, Select Maven-archetype-webapp), Next
3. For example, the next is to fill in GroupID and Archetypeid, the internet looked for a look
Explanations from the Internet:
GroupID is the unique identifier of the project organization, which actually corresponds to the structure of the Java package, which is the directory structure of Java in the main directory.
Artifactid is the unique identifier of the project, the name of the actual project, which is the name of the project root directory.
In general, the naming habit of the package is the reverse of the domain name, add a company or personal name, personal habits. Www.demo.com, Com.richard.demo; As you know, test is the project name, and also the unique identifier of all project groups (GROUPID): Com.richard, the project's unique identifier (Artifactid) demo. So you know what it's about to fill in. Next
4. For example, this step, directly by default, click Next can also, but may be created after the completion of the download of some things, and then lead to slower, so I see write. Click on the box to add a good, enter the corresponding name and value, and then click OK. Next.
Explanations from the Internet:
Archetypecatalog represents the plug-in uses the archetype metadata, does not add this parameter when the default is Remote,local, that is, the central warehouse archetype metadata, because the central warehouse archetype too much, so the result is very slow, Specify internal to indicate that only internal metadata is used.
5. For example, fill out project name and module name, module name is the same as project name by default, but if this project only has this module, do not change the matter, if there are many module, it must be modified slightly.
Under Maven managed project, you can have a number of module sub-projects. It's a bit like a package that can have a lot of sub-packages (individuals are so analogical). Finish.
6. For example, don't worry, the project will not be able to run, depends on whether you have the Tomcat and JDK configured (running environment). The left circle is the project directory structure, this comparison is good, and then in the upper right corner, click on the drop-down box, and then click Edit Configurations (to set the operating environment).
7, for example, click the plus sign, then scroll down to find the Tomcat server, then select Local (choose Tomcat locally),
8. For example, the default is the server configuration, 2 of the name is synchronized with 1, all modify the name of 1 is good, and then 3 Select your local tomcat path, these are configured, then switch to the server next to the Deployment property box
9. For example, switch to the Deployment box, click the plus sign, then select the Exploded war and click OK.
10. For example, enter the address you want to run on the right side, which is usually the same as project name. The final step, and the most important step, is to click Apply, and OK.
11. Now that the preparation is basically complete, the next step is to click on the run on the right and wait for the miracle moment.
OK, do not know if your success, if your final results page and I, generally no problem, the results are as follows.
13. Source: http://blog.csdn.net/mercyt/article/details/51286825
IntelliJ IDEA2016.1 + maven to create a Java Web project (GO)