fairnet/src/main/webapp/WEB-INF/config/egovframework/springmvc/egov-com-servlet.xml
2024-09-11 17:10:37 +09:00

102 lines
5.7 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:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd">
<!-- 패키지 내 Controller, Service, Repository 클래스의 auto detect를 위한 mvc 설정 -->
<context:component-scan base-package="egovframework, kcc, seed ">
<!-- <context:component-scan base-package="kcc"> -->
<!-- <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/> -->
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Service"/>
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Repository"/>
</context:component-scan>
<!-- 서블릿컨네이너상의 exception에 대한 오류 페이지를 연결하는 mvc 설정 -->
<bean class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
<property name="defaultErrorView" value="cmm/error/egovError"/>
<property name="exceptionMappings">
<props>
<prop key="org.springframework.dao.DataAccessException">cmm/error/dataAccessFailure</prop>
<prop key="org.springframework.transaction.TransactionException">cmm/error/transactionFailure</prop>
<prop key="egovframework.rte.fdl.cmmn.exception.EgovBizException">cmm/error/egovError</prop>
<prop key="org.springframework.security.AccessDeniedException">cmm/error/accessDenied</prop>
</props>
</property>
</bean>
<bean class="org.springframework.web.servlet.view.BeanNameViewResolver" id="viewResolver" p:order="0"/>
<!-- 화면처리용 JSP 파일명의 prefix, suffix 처리에 대한 mvc 설정 -->
<bean class="org.springframework.web.servlet.view.UrlBasedViewResolver" p:order="1"
p:viewClass="org.springframework.web.servlet.view.JstlView"
p:prefix="/WEB-INF/jsp/" p:suffix=".jsp"/>
<!-- json 추가 -->
<bean id="jsonView" class="org.springframework.web.servlet.view.json.MappingJackson2JsonView">
<property name="contentType" value="application/json;charset=UTF-8"/>
</bean>
<bean id="excelDownloadView" class="kcc.com.cmm.spring.view.ExcelDownloadView"/>
<!-- Annotation 을 사용하지 않는 경우에 대한 MVC 처리 설정 -->
<mvc:view-controller path="/cmmn/validator.do" view-name="cmmn/validator"/>
<mvc:annotation-driven/>
<context:component-scan base-package="kcc.com.cmm" />
<!-- System Log Aspect -->
<bean id="syslog" class="kcc.let.sym.log.lgm.service.EgovSysLogAspect" />
<aop:config>
<!-- 관리자 로그를 위한 메소드 -->
<aop:aspect id="sysLogAspect" ref="syslog">
<aop:after pointcut="( execution(public * kcc..*Controller.select*(..)) ||
execution(public * kcc..*Controller.insert*(..)) ||
execution(public * kcc..*Controller.*List(..)) ||
execution(public * kcc..*Controller.*Detail(..)) ||
execution(public * kcc..*Controller.*Create(..)) ||
execution(public * kcc..*Controller.*Regist(..)) ||
execution(public * kcc..*Controller.*Prcs(..)) ||
execution(public * kcc..*Controller.*Pop(..)) ||
execution(public * kcc..*Controller.update*(..)) ||
execution(public * kcc..*Controller.delete*(..)) ) ||
execution(public * seed..*Controller.select*(..)) ||
execution(public * seed..*Controller.insert*(..)) ||
execution(public * seed..*Controller.*List*(..)) ||
execution(public * seed..*Controller.*Detail*(..)) ||
execution(public * seed..*Controller.*Create*(..)) ||
execution(public * seed..*Controller.*Regist*(..)) ||
execution(public * seed..*Controller.*Prcs*(..)) ||
execution(public * seed..*Controller.*Pop*(..)) ||
execution(public * seed..*Controller.update*(..)) ||
execution(public * seed..*Controller.delete*(..)) )
&amp;&amp;
!(execution(public * kcc..*Controller.selectMainMenuHead(..)) ||
execution(public * kcc..*Controller.selectMainMenuLeft(..)) ||
execution(public * kcc..*Controller.*Web(..))||
execution(public * seed..*Controller.*Web(..)) )" method="logAdminSelect" />
</aop:aspect>
</aop:config>
<!-- 분쟁조정 서블릿 mapping 경로들 -->
<mvc:resources mapping="/img/**" location="/WEB-INF/views/_common/_images/" />
<mvc:resources mapping="/site/**" location="/WEB-INF/views/site/" />
<mvc:resources mapping="/css/**" location="/WEB-INF/views/_common/_css/" />
<mvc:resources mapping="/js/**" location="/WEB-INF/views/_common/_js/" />
<mvc:resources mapping="/ico/**" location="/WEB-INF/views/_common/_ico/" />
<mvc:resources mapping="/font/**" location="/WEB-INF/views/_common/_font/" />
<mvc:resources mapping="/ark/**" location="/WEB-INF/views/_common/_ark/" />
<!-- 분쟁조정 서블릿 mapping 경로들 끝 -->
<mvc:resources mapping="/kccadrPb/**" location="/kccadrPb/" />
<mvc:resources mapping="/editor/**" location="/editor/" />
<mvc:resources mapping="/codemirror/**" location="/codemirror/" />
</beans>