<?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:mvc="http://www.springframework.org/schema/mvc"
       xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
		http://www.springframework.org/schema/mvc
     	http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd">

    <mvc:annotation-driven>
        <mvc:argument-resolvers>
            <bean class="com.kmall.api.resolver.LoginUserHandlerMethodArgumentResolver">
                <property name="userService" ref="apiUserService"></property>
            </bean>
        </mvc:argument-resolvers>
    </mvc:annotation-driven>

    <mvc:interceptors>
        <mvc:interceptor>
            <mvc:mapping path="/api/**"/>
            <ref bean="authorizationInterceptor"/>
        </mvc:interceptor>
    </mvc:interceptors>

    <bean id="authorizationInterceptor" class="com.kmall.api.interceptor.AuthorizationInterceptor"/>
</beans>