fairnet/src/main/resources/egovframework/spring/com/context-aspect.xml

79 lines
3.5 KiB
XML

<?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:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd">
<!-- 내부업무의 기능 작동과정에서 Exception 발생시 후처리를 위한 AOP설정 -->
<aop:config>
<aop:pointcut id="serviceMethod"
expression="execution(* kcc.let..impl.*Impl.*(..))
or execution(* kcc.com..impl.*Impl.*(..))
or execution(* seed.com..*Service.*(..))
" />
<aop:aspect ref="exceptionTransfer">
<aop:after-throwing throwing="exception" pointcut-ref="serviceMethod" method="transfer" />
</aop:aspect>
</aop:config>
<!-- Exception 발생시 후처리를 위해 표준프레임워크 실행환경의 ExceptionTransfer를 활용하도록 설정-->
<bean id="exceptionTransfer" class="egovframework.rte.fdl.cmmn.aspect.ExceptionTransfer">
<property name="exceptionHandlerService">
<list>
<ref bean="defaultExceptionHandleManager" />
<ref bean="otherExceptionHandleManager" />
</list>
</property>
</bean>
<!-- 파라메터 로그 찍기 -->
<bean id="loggerAspect" class="kcc.com.cmm.aspect.LoggerAspect"></bean>
<aop:config>
<aop:pointcut expression="execution(* kcc..*Controller.*(..)) or execution(* seed..*Controller.*(..)) " id="loggerPointCut"/>
<aop:aspect ref="loggerAspect">
<aop:around pointcut-ref="loggerPointCut" method="methodLogger"/>
</aop:aspect>
</aop:config>
<!-- Exception 발생에 대한 기본Excpton처리를 위해 표준프레임워크 실행환경의 DefaultExceptionTransfer를 활용하도록 설정-->
<bean id="defaultExceptionHandleManager" class="egovframework.rte.fdl.cmmn.exception.manager.DefaultExceptionHandleManager">
<property name="reqExpMatcher">
<ref bean="antPathMater"/>
</property>
<property name="patterns">
<list>
<value>**service.impl.*</value>
<value>seed/com/gtm/**/*Service.*</value>
</list>
</property>
<property name="handlers">
<list>
<ref bean="egovHandler" />
</list>
</property>
</bean>
<!-- Exception 발생에 대한 기타Excpton처리를 위해 표준프레임워크 실행환경의 DefaultExceptionTransfer를 활용하도록 설정-->
<bean id="otherExceptionHandleManager" class="egovframework.rte.fdl.cmmn.exception.manager.DefaultExceptionHandleManager">
<property name="reqExpMatcher">
<ref bean="antPathMater"/>
</property>
<property name="patterns">
<list>
<value>**service.impl.*</value>
<value>seed/com/gtm/**/*Service.*</value>
</list>
</property>
<property name="handlers">
<list>
<ref bean="otherHandler" />
</list>
</property>
</bean>
<!-- 템플릿 내에서 Exception 발생시 실제 처리를 위한 클래스 설정-->
<bean id="egovHandler" class="kcc.com.cmm.EgovComExcepHndlr" />
<bean id="otherHandler" class="kcc.com.cmm.EgovComOthersExcepHndlr" />
</beans>