<?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"
       xsi:schemaLocation="
            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-3.1.xsd">

    <context:component-scan base-package="io.github.zutherb.appstash.shop.service.recommendation"/>

    <import resource="classpath:io/github/zutherb/appstash/shop/service/product/spring-context.xml"/>
    <import resource="spring-mahout-context.xml"/>


    <bean id="testValues" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
        <property name="properties">
            <props>
                <prop key="mongo.db">shop-test</prop>
                <prop key="mongo.host">localhost</prop>
                <prop key="mongo.port">27017</prop>
                <prop key="mahout.mongodatamodel.manage">false</prop>
                <prop key="mahout.mongodatamodel.finalRemove">false</prop>
                <prop key="mahout.mongodatamodel.nearestNUserNeighborhood.n">5</prop>
            </props>
        </property>
    </bean>

    <beans profile="test">
        <context:property-placeholder system-properties-mode="OVERRIDE"
                                      ignore-resource-not-found="false"
                                      ignore-unresolvable="true"
                                      properties-ref="testValues"/>
    </beans>
</beans>