<?xml version="1.0" encoding="UTF‐8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema‐instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven‐
4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.itheima</groupId>
<artifactId>springsecuritydemo</artifactId>
<version>1.0‐SNAPSHOT</version>
<packaging>war</packaging>
<name>springsecuritydemo Maven Webapp</name>
<url>http://www.example.com</url>
<properties>
<project.build.sourceEncoding>UTF‐8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>com.itheima</groupId>
<artifactId>health_interface</artifactId>
<version>1.0‐SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7‐maven‐plugin</artifactId>
<configuration>
<!‐‐ 指定端口 ‐‐>
<port>85</port>
<!‐‐ 请求路径 ‐‐>
<path>/</path></configuration>
</plugin>
</plugins>
</build>
</project>
<!DOCTYPE web‐app PUBLIC
"‐//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web‐app_2_3.dtd" >
<web‐app>
<display‐name>Archetype Created Web Application</display‐name>
<filter>
<!‐‐
DelegatingFilterProxy用于整合第三方框架
整合Spring Security时过滤器的名称必须为springSecurityFilterChain,
否则会抛出NoSuchBeanDefinitionException异常
‐‐>
<filter‐name>springSecurityFilterChain</filter‐name>
<filter‐
class>org.springframework.web.filter.DelegatingFilterProxy</filter‐class>
</filter>
<filter‐mapping>
<filter‐name>springSecurityFilterChain</filter‐name>
<url‐pattern>/*</url‐pattern>
</filter‐mapping>
<servlet>
<servlet‐name>springmvc</servlet‐name>
<servlet‐
class>org.springframework.web.servlet.DispatcherServlet</servlet‐class>
<!‐‐ 指定加载的配置文件 ,通过参数contextConfigLocation加载 ‐‐>
<init‐param>
<param‐name>contextConfigLocation</param‐name>
<param‐value>classpath:spring‐security.xml</param‐value>
</init‐param>
<load‐on‐startup>1</load‐on‐startup>
</servlet>
<servlet‐mapping>
<servlet‐name>springmvc</servlet‐name>
<url‐pattern>*.do</url‐pattern>
</servlet‐mapping>
</web‐app>
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |