| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?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:p="http://www.springframework.org/schema/p"
- xmlns:context="http://www.springframework.org/schema/context"
- xmlns:mvc="http://www.springframework.org/schema/mvc"
- xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
- <mvc:annotation-driven>
- <mvc:path-matching suffix-pattern="true" />
- </mvc:annotation-driven>
- <context:component-scan base-package="com.kingdee.eas.custom.integration"
- use-default-filters="true">
- <!-- <context:include-filter type="annotation"
- expression="org.springframework.stereotype.Controller" /> -->
- </context:component-scan>
- <mvc:interceptors>
- <mvc:interceptor>
- <mvc:mapping path="/**" />
- <ref bean="openApiAuthInterceptor" />
- </mvc:interceptor>
- </mvc:interceptors>
- <!-- 静态资源映射 -->
- <mvc:resources mapping="/css/**" location="/" />
- <mvc:resources mapping="/views/**" location="/" />
- <mvc:resources mapping="/js/**" location="/" />
- <!-- 或者使用通配符统一映射(不推荐,会暴露所有静态资源) -->
- <!-- <mvc:resources mapping="/static/**" location="/" /> -->
- <!-- 视图解析器(只处理 JSP) -->
- <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
- <property name="prefix" value="/views/" />
- <property name="suffix" value=".jsp" />
- </bean>
- <!-- <bean class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver" -->
- <!-- 默认错误视图(当没有匹配的异常映射时使用) -->
- <!-- <property name="defaultErrorView" value="error"/> -->
- <!-- 将异常信息存入 Model 中的 key -->
- <!-- <property name="exceptionAttribute" value="exception"/> -->
- <!-- 定义异常类型与视图名称的映射 -->
- <!-- <property name="exceptionMappings"> -->
- <!-- <props> -->
- <!-- <prop key="java.lang.NullPointerException">error/nullPointer</prop> -->
- <!-- <prop key="java.lang.IllegalArgumentException">error/illegalArg</prop> -->
- <!-- <prop
- key="com.kingdee.shr.base.syssetting.exception.BusinessException">error/business</prop> -->
- <!-- 可以添加更多自定义异常 -->
- <!-- <prop key="java.lang.Exception">error/error</prop> -->
- <!-- </props> -->
- <!-- </property> -->
- <!-- 可选:记录异常日志 -->
- <!-- <property name="warnLogCategory" value="com.kingdee.exception"/> -->
- <!-- </bean> -->
- </beans>
|