<?xml version="1.0" encoding="UTF-8"?>
<beans default-lazy-init="true"
       xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:util="http://www.springframework.org/schema/util" 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.1.xsd
			http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd
			http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.1.xsd
			http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd">

    <!-- 设置Annotation的编码使用UTF-8，该Bean定义必须放在包扫描之前s -->
    <!--<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
        <property name="messageConverters">
            <list>
                <bean
                    class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter">
                </bean>
                <bean
                    class="org.springframework.http.converter.StringHttpMessageConverter">
                    <property name="supportedMediaTypes">
                        <list>
                            <value>text/html;charset=UTF-8</value>
                        </list>
                    </property>
                </bean>
            </list>
        </property>
    </bean>-->

    <!-- Annotation Initilization -->
    <!--<context:annotation-config />-->

    <!-- Annotation Of Mvc Initilization -->
    <mvc:annotation-driven/>

    <!-- 扫描制定的包，注解 -->
    <bean class="com.mangofactory.swagger.configuration.SpringSwaggerConfig"/>
    <context:component-scan base-package="com.house365.*,com.house365"/>
    <!-- REST Client 配置 -->
    <bean id="restTemplate" class="org.springframework.web.client.RestTemplate">
        <property name="messageConverters">
            <list>
                <bean class="org.springframework.http.converter.StringHttpMessageConverter"/>
                <bean class="org.springframework.http.converter.FormHttpMessageConverter"/>
                <bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"/>
            </list>
        </property>
    </bean>
    <!-- load properties and catche them -->
    <bean id="memoryPropertyPlaceholderConfigurer" class="com.house365.web.util.MemoryPropertyPlaceholderConfigurer">
        <property name="locations">
            <list>
                <value>classpath:/properties/moduleUrlMapping.properties</value>
                <value>classpath:/properties/system.properties</value>
            </list>
        </property>
    </bean>

    <!-- load properties -->
    <context:property-placeholder ignore-unresolvable="true" order="1" location="classpath*:/properties/*.properties"/>

    <!-- 基于属性文件构造出Properties对象 -->
    <util:properties id="system" location="classpath:/properties/system.properties"/>
    <util:properties id="quartz" location="classpath:/properties/quartz.properties"/>
    <util:properties id="shiro" location="classpath:/properties/shiro.properties"/>
</beans>
