This article mainly explains how to use eclipse+maven to build the SSM framework:
Read the guide:
(1) First specify the environment version: jdk 1.8 64-bit, eclipse 64-bit, Tomcat 7 64-bit, maven3.5;
Actual operation:
(1) First build the basic environment
(1) Download maven3.5 first: http://maven.apache.org/download.cgi
After downloading, unzip it and put it in the d:\Java path
In the environment variable, add the system variable name: MAVEN_HOME, and the variable value: D:\Java\maven
Append in Path: %MAVEN_HOME%\bin;
Enter in the command line window: mvn –v, if you see the following figure, it means that the maven installation and configuration is complete
(2) The settings of the maven warehouse:
Create a folder in the sibling directory installed in maven: repository
(3) The configuration file of the configuration warehouse: settings.xml, in the directory of the folder:
(4) Eclipse integrates maven:
Set eclipse's own maven integration tool, find the Maven node in Preferences, and observe whether the settings of the User Settings item are correct
Click the Installations node and add the maven runtime
(5)
Set JDK when creating maven project
Problem description: When eclipse creates a maven project, the default JDK version displayed is 1.5, and the actual JDK used is 1.8. How to modify it?
Solution: Find the storage location of the local maven warehouse, such as: ${user.home}/.m2/ path, edit the settings.xml file, and configure it under the profiles node
<profile>
<id>jdk-1.8</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
</activation>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>
</profile>
(3) Create an SSM project:
1) Select Maven Project
2) Click Next and select the default workspace location
3) Select web type
4) Fill in GroupID, ArtifactID
Group ID: Equivalent to an organization
Artifact ID: Equivalent to a specific project under this organization
Packege: Generate a default name based on Group ID and Artifact ID
5) The created maven project is as shown below
Basically it's over! ! ! ! ! !
You can refer to the following article: https://www.cnblogs.com/knightsu/p/knightsu.html
Please use your mobile phone to "scan" x