官术网_书友最值得收藏!

Step 2—pom.xml changes

Open the pom.xml file and add the following code within the project tag (<project></project>):

<!-- Spring dependencies -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>5.0.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>5.0.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-crypto</artifactId>
<version>5.0.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>5.0.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>5.0.4.RELEASE</version>
</dependency>
<!-- Servlet and JSP related dependencies -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>javax.servlet.jsp-api</artifactId>
<version>2.3.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp.jstl</groupId>
<artifactId>javax.servlet.jsp.jstl-api</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
<!-- For datasource configuration -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
<version>2.1.1</version>
</dependency>
<!-- We will be using MySQL as our database server -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>6.0.6</version>
</dependency>

Build a setup on pom.xml in which we will be using jetty to run the application created.

<build>
<plugins>
<!-- We will be using jetty plugin to test the war file -->
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.4.8.v20171121</version>
</plugin>
</plugins>
</build>
主站蜘蛛池模板: 香格里拉县| 南溪县| 蕲春县| 运城市| 宁强县| 汉源县| 新龙县| 息烽县| 沧源| 新河县| 望都县| 麻阳| 新田县| 台中市| 蓬莱市| 二手房| 社会| 雷州市| 慈溪市| 灵山县| 青田县| 阿鲁科尔沁旗| 英山县| 五指山市| 佛山市| 博乐市| 东安县| 确山县| 海丰县| 赤壁市| 敦煌市| 油尖旺区| 永春县| 古蔺县| 五华县| 崇礼县| 湘潭市| 固阳县| 凌海市| 甘德县| 侯马市|