spring 全局异常处理-SimpleMappingExceptionResolver
<bean id="handlerExceptionResolver"
value="/auth/commons/error" />
<property name="exceptionMappings">
<props>
<prop key="java.lang.Exception">/auth/commons/error</prop>
<prop key="java.lang.RuntimeException">/auth/commons/error</prop>
</props>
</property>
</bean>
?
?
说明:
1、defaultErrorView, 当没有配置异常处理映射时,该默认视图将起作用
2、exceptionMappings 异常处理映射Property,key=“异常名称”, vlaue=异常处理视图