初始化项目
This commit is contained in:
41
sso/src/main/resources/spring/springmvc-config.xml
Normal file
41
sso/src/main/resources/spring/springmvc-config.xml
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-4.1.xsd
|
||||
http://www.springframework.org/schema/mvc
|
||||
http://www.springframework.org/schema/mvc/spring-mvc.xsd"
|
||||
default-lazy-init="true">
|
||||
|
||||
<!-- 注解驱动 -->
|
||||
<mvc:annotation-driven>
|
||||
<mvc:message-converters register-defaults="true">
|
||||
<bean class="org.springframework.http.converter.StringHttpMessageConverter">
|
||||
<property name="supportedMediaTypes" value="text/html;charset=UTF-8"/>
|
||||
</bean>
|
||||
</mvc:message-converters>
|
||||
</mvc:annotation-driven>
|
||||
|
||||
<context:component-scan base-package="com.sso.controller"/>
|
||||
|
||||
<mvc:interceptors>
|
||||
<mvc:interceptor>
|
||||
<mvc:mapping path="/**"/>
|
||||
<bean class="com.njcn.interceptor.CSRFInterceptor"/>
|
||||
</mvc:interceptor>
|
||||
</mvc:interceptors>
|
||||
|
||||
<!--处理静态资源的拦截问题-->
|
||||
<mvc:default-servlet-handler/>
|
||||
|
||||
<!-- 视图解析器 -->
|
||||
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
||||
<property name="prefix" value="/WEB-INF/views/"/>
|
||||
<property name="suffix" value=".jsp"/>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
Reference in New Issue
Block a user