(Continued from the previous article)
Start a new maven project
One:
The relationship between Project and Module is similar to the relationship between parent folders and subfolders, Module is a subfolder
You can put the project directly in the parent folder (Project), then there is no need for subfolders. Large projects need to be divided into modules, and Module is used
two:
Create the Project directly here: click next to this step, select the webapp in the picture (this option may take a while to load for the first time
Then fill in groupid and artifactid
Groupid: Similar to the name of the company, generally fill in com.xx or org.xx
Artifactid: similar to the name of the department, usually fill in the name of the project yyy
Look at the picture below to understand the difference between the two: the following is built by myself:
After clicking Finsh, it may take a while: the created maven project appears
The most obvious sign of the Maven project is a pom.xml, open it
Fill in here, the reference path mentioned in the previous article.
For example, you need spring-core.jar to go to this website
: http://mvnrepository.com/
Search for spring-core.jar maven and it comes out
will
<!-- https://mvnrepository.com/artifact/org.springframework/spring-core -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>4.3.2.RELEASE</version>
</dependency>
This copy is placed under pom.xml
Under the dependencys node
Well, as long as you click save, then he will go to the default path to find whether the package already exists, if it exists, then reference it, if it does not exist, download it, and then reference it. Then if you create a project next time, you don’t need to download it again if you use this package.
That's it for basic usage.
Thanks for reading! ! !