SSM road --springMVC webapp learning environment to build the first day _maven

First, create a webapp project

1. Select maven item
2, select jdk version
3, check the skeleton: the Create archetype from
4 to select the webapp
Here Insert Picture Description
the Next
Here Insert Picture Description
the Next
here I had to reconfigure the use of these two, the reference to a custom maven repository and the use of Ali mirroring
is not configured the default will lead to construction of the project is very slow, because the default is outside the network
Here Insert Picture Description

Second, the configuration file pom.xml

maven compiler version selection jdk1.8, another lock in the following version of spring is 5.0.2.RELEASE, because the use of a dependent spring, other spring dependent under the framework had to be the same version, so write directly to a quote here to change the time directly in the quote above you can change the
Here Insert Picture Description
add-dependent:

<dependencies>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context</artifactId>
      <version>${spring.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
      <version>${spring.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
      <version>${spring.version}</version>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <version>2.5</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.servlet.jsp</groupId>
      <artifactId>jsp-api</artifactId>
      <version>2.0</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>

Third, the configuration server

Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description
Above, the following was found to have a warning, that there is no Artifacts, next add

Here Insert Picture Description
This corresponds to select the project name
Here Insert Picture Description
and the page will appear in this box, you can select the name of the project
Here Insert Picture Description
you're done, run a try, run the index will default to run his program with the default, jsp, which wrote helloword
Here Insert Picture Description

Published 23 original articles · won praise 0 · Views 525

Guess you like

Origin blog.csdn.net/SixthMagnitude/article/details/104241002