<?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:context="http://www.springframework.org/schema/context"
       xmlns:solr="http://www.springframework.org/schema/data/solr"
       xsi:schemaLocation="http://www.springframework.org/schema/data/solr http://www.springframework.org/schema/data/solr/spring-solr.xsd
		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
    <!--
     #####################################
     CONTEXT SETTINGS
     #####################################
      -->
    <bean id="configProperties"
          class="org.springframework.beans.factory.config.PropertiesFactoryBean">
        <property name="locations">
            <list>
                <value>classpath:configuration.properties</value>
                <value>classpath:database.properties</value>
                <value>classpath:conf.properties</value>
            </list>
        </property>
    </bean>
    <bean id="propertyConfigurer"
          class="org.springframework.beans.factory.config.PreferencesPlaceholderConfigurer">
        <property name="properties" ref="configProperties" />
    </bean>
    <!--
     #####################################
     SOLR
     #####################################
    -->
    <bean id="solrServer" class="org.springframework.data.solr.server.support.HttpSolrServerFactoryBean">
        <property name="url" value="${solr.host}"/>
        <property name="maxConnections" value="${solr.maxConnections}"/>
        <property name="timeout" value="${solr.timeout}"/>
    </bean>
    <bean id="solrTemplate" class="org.springframework.data.solr.core.SolrTemplate">
        <constructor-arg ref="solrServer"/>
    </bean>
    <bean id="searchRepository" class="com.lyms.platform.job.index.repository.SolrProductRepository">
        <property name="solrOperations" ref="solrTemplate"/>
    </bean>
    <bean id="doctorRepository" class="com.lyms.platform.job.index.repository.DoctorUserPatientsMapsRepository">
        <property name="solrOperations" ref="solrTemplate"/>
        <property name="solrTemplate" ref="solrTemplate"/>
    </bean>
    <!-- 采用注释的方式配置bean -->
    <context:annotation-config />
    <context:component-scan base-package="com.lyms.platform.job.index.service"/>
    <import resource="applicationContext_biz_patient.xml"/>
    <import resource="applicationContext-dal.xml"/>
</beans>