spring 설정 파일에서 사용
Exception에 대해서 view로 연결시켜 준다.
<!--
- This bean resolves specific types of exceptions to corresponding logical
- view names for error views. The default behaviour of DispatcherServlet
- is to propagate all exceptions to the servlet container: this will happen
- here with all other types of exceptions.
-->
<bean class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
<property name="defaultErrorView" value="cmmn/bizError"/>
<property name="exceptionMappings">
<props>
<prop key="org.springframework.dao.DataAccessException">cmmn/dataAccessFailure</prop>
<prop key="org.springframework.transaction.TransactionException">cmmn/transactionFailure</prop>
<prop key="egovframework.rte.fdl.cmmn.exception.EgovBizException">cmmn/bizError</prop>
<prop key="org.springframework.security.AccessDeniedException">cmmn/accessDenied</prop>
</props>
</property>
</bean>
출처 : 전자정부프레임워크
Exception에 대해서 view로 연결시켜 준다.
<!--
- This bean resolves specific types of exceptions to corresponding logical
- view names for error views. The default behaviour of DispatcherServlet
- is to propagate all exceptions to the servlet container: this will happen
- here with all other types of exceptions.
-->
<bean class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
<property name="defaultErrorView" value="cmmn/bizError"/>
<property name="exceptionMappings">
<props>
<prop key="org.springframework.dao.DataAccessException">cmmn/dataAccessFailure</prop>
<prop key="org.springframework.transaction.TransactionException">cmmn/transactionFailure</prop>
<prop key="egovframework.rte.fdl.cmmn.exception.EgovBizException">cmmn/bizError</prop>
<prop key="org.springframework.security.AccessDeniedException">cmmn/accessDenied</prop>
</props>
</property>
</bean>
출처 : 전자정부프레임워크
'Jsp-Servlet > Spring' 카테고리의 다른 글
spring transaction 정리문서 (2) | 2011.08.05 |
---|---|
spring anotation 정보 출력 (1) | 2011.05.13 |
properties 리소스 번들 사용하기 (0) | 2011.03.21 |
ParameterizableViewController 사용하기 (2) | 2011.03.21 |
인터셉터(interceptor) 사용하기 (1) | 2011.03.21 |