标签:
@ExceptionHandler(RuntimeException.class)
public String runtimeExceptionHandler(RuntimeException ex){
System.out.println("exception Handler");
return "redirect:error.jsp";
}
<bean class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
<property name="exceptionMappings">
<props>
<prop key="java.lang.RuntimeException">redirect:error.jsp</prop>
</props>
</property>
</bean>
标签:
原文地址:http://www.cnblogs.com/yanqin/p/5828376.html