2011. 3. 21. 17:46
반응형
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>

출처 : 전자정부프레임워크
반응형
Posted by seongsland