개발자

전자정부프레임워크 RequestMappingHandlerMapping Mapped 경로 추가 방법

쿠카곰돌이 2020. 6. 26. 03:42
반응형

/ariabm/src/main/webapp/WEB-INF/config/egovframework/springmvc/egov-com-servlet.xml

 

<beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="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/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd">

 

<context:component-scan base-package="egovframework">

<context:include-filter expression="org.springframework.stereotype.Controller" type="annotation"/>

<context:exclude-filter expression="org.springframework.stereotype.Service" type="annotation"/>

<context:exclude-filter expression="org.springframework.stereotype.Repository" type="annotation"/>

</context:component-scan>

 

<context:component-scan base-package="eeumit">

<context:include-filter expression="org.springframework.stereotype.Controller" type="annotation"/>

<context:exclude-filter expression="org.springframework.stereotype.Service" type="annotation"/>

<context:exclude-filter expression="org.springframework.stereotype.Repository" type="annotation"/>

</context:component-scan>

 

<!-- For Pagination Tag -->

<bean class="egovframework.com.cmm.ImagePaginationRenderer" id="imageRenderer"/>

 

<bean class="egovframework.rte.ptl.mvc.tags.ui.pagination.DefaultPaginationManager" id="paginationManager">

<property name="rendererType">

<map>

<entry key="image" value-ref="imageRenderer"/>

</map>

</property>

</bean>

 

    <bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter">

        <property name="webBindingInitializer">

            <bean class="egovframework.com.cmm.web.EgovBindingInitializer"/>

        </property>

    </bean>

    

    <!-- setting Locale Locale Interceptor 설정하기  -->

    <bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor" id="localeChangeInterceptor" p:paramName="lang"/>

 

    <bean class="org.springframework.web.servlet.i18n.SessionLocaleResolver" id="localeResolver"/>

    

<!--

<bean id="egovWebLogInterceptor" class="egovframework.com.sym.log.wlg.web.EgovWebLogInterceptor" />

-->

 

    <bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping">

        <property name="interceptors">

            <list>

                <ref bean="localeChangeInterceptor"/>

                <!-- <ref bean="egovWebLogInterceptor"/> -->

            </list>

        </property>

    </bean>

    

    <!-- IP 정보 기록 및 로그인 체크가 필요한 URL과 로그인 여부를 체크해줄 인터셉터를 등록한다. -->

    <!-- 분리 -->

    

<bean class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">

<property name="defaultErrorView" value="egovframework/com/cmm/error/egovError"/>

<property name="exceptionMappings">

<props>

<prop key="org.springframework.dao.DataAccessException">egovframework/com/cmm/error/dataAccessFailure</prop>

<prop key="org.springframework.transaction.TransactionException">egovframework/com/cmm/error/dataAccessFailure</prop>

<prop key="egovframework.rte.fdl.cmmn.exception.EgovBizException">egovframework/com/cmm/error/egovBizException</prop>

<prop key="org.springframework.web.HttpSessionRequiredException">egovframework/com/uat/uia/EgovLoginUsr</prop>

<prop key="egovframework.com.cmm.exception.EgovXssException">egovframework/com/cmm/error/EgovXssException</prop>

</props>

</property>

</bean>

 

<!-- for JFile -->

<bean class="org.springframework.web.servlet.view.BeanNameViewResolver" p:order="0"/>

 

<bean class="org.springframework.web.servlet.view.UrlBasedViewResolver" p:order="1" p:prefix="/WEB-INF/jsp/" p:suffix=".jsp" p:viewClass="org.springframework.web.servlet.view.JstlView"/>

  

<bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView" id="jsonView">

<property name="contentType" value="text/html;charset=UTF-8"/>

</bean>

 

<!-- Facebook 설정 -->

<mvc:default-servlet-handler/>

<!--

<bean class="org.springframework.social.connect.web.ProviderSignInController">

<constructor-arg ref="connectionFactoryLocator" />

<constructor-arg ref="usersConnectionRepository" />

<constructor-arg>

<bean class="egovframework.com.uss.ion.fbk.web.FacebookSimpleSignInAdapter"/>

</constructor-arg>

<property name="signInUrl" value="/uss/ion/fbk/facebookSignin.do"/>

<property name="postSignInUrl" value="/uss/ion/fbk/facebook.do"/>

</bean>

<mvc:interceptors>

<mvc:interceptor>

<mvc:mapping path="/uss/ion/fbk/**" />

<bean class="egovframework.com.uss.ion.fbk.web.FacebookUserInterceptor" >

<constructor-arg ref="usersConnectionRepository"/>

</bean>

</mvc:interceptor>

</mvc:interceptors>

<mvc:view-controller path="/uss/ion/fbk/facebook.do" view-name="egovframework/com/uss/ion/fbk/EgovFacebookHome" />

<mvc:view-controller path="/uss/ion/fbk/facebookSignin.do" view-name="egovframework/com/uss/ion/fbk/EgovFacebookSignin" />

<mvc:view-controller path="/uss/ion/fbk/facebookSignout.do" view-name="egovframework/com/uss/ion/fbk/EgovFacebookHome" />

-->

 

</beans>

반응형