The first step is to create a MAVEN-based Java Web project
Note that we are going to use a webapp template, which is a template that Maven provides to create a Java Web project
This I just started not to pay attention to a closer look, the original web app skeleton has 2,
I always chose the first one, because the search, always thought the match result is one,
Later found that the following is what I want.
So, you have to pay attention.
Step Two
Attention:
The properties of the interface add a parameter archetypecatalog=internal, without this parameter, will be very slow when Maven builds the skeleton, and sometimes will be directly stuck.
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.
Shan Xu: https://www.zhihu.com/question/51153784/answer/135799897 Source: The copyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source.
Step Three
Selecting the Import Changes option indicates that a new dependency is added to the project
The Enable Auto-import represents a new change in the Pom file, which automatically adjusts the dependencies in the project and does not prompt each change.
Fourth Step directory structure
Fifth Step Flie-->project structure
Then modify the Pom.xml file to add
<Plugins>
<Plugin>
<groupid>org.apache.maven.plugins</GROUPID>
< artifactid>maven-compiler-plugin</ARTIFACTID>
<version>2.3.2</< Span style= "color: #000080; Font-weight:bold ">VERSION>
<CONFIGURATION>
< source>1.8</ SOURCE>
< target>1.8</ TARGET>
</ CONFIGURATION>
</PLUGIN>
</PLUGINS>
IntelliJ idea 2017 creating a Maven Java Web program