.dal.1.2.source-code.dal-context.xml Maven / Gradle / Ivy
<?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:mongo="http://www.springframework.org/schema/data/mongo" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo-2.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd"> <context:component-scan base-package="com.testquack, ru.greatbit.whoru, ru.greatbit.plow"> <context:include-filter type="annotation" expression="ru.greatbit.plow.contract.Plugin"/> </context:component-scan> <bean id="props" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" > <property name="ignoreResourceNotFound" value="true"/> <property name="localOverride" value="true"/> <property name="locations"> <list> <value>classpath*:quack.properties</value> <value>file/:quack.properties</value> </list> </property> </bean> <mongo:repositories base-package="com.testquack.dal" repository-impl-postfix="CustomImpl"/> <mongo:mongo-client id="mongo" replica-set="${mongo.replicaSet}"> <mongo:client-options connections-per-host="40" threads-allowed-to-block-for-connection-multiplier="1000" connect-timeout="15000" socket-timeout="60000" /> </mongo:mongo-client> <mongo:db-factory id="mongoDbFactory" dbname="${mongo.dbname}" mongo-ref="mongo" /> <bean id="mongoOperations" class="org.springframework.data.mongodb.core.MongoTemplate" scope="prototype"> <constructor-arg name="mongoDbFactory" ref="mongoDbFactory"/> </bean> <bean id="mongoTemplate" class="org.springframework.data.mongodb.core.MongoTemplate" scope="prototype"> <constructor-arg name="mongoDbFactory" ref="mongoDbFactory"/> </bean> <!-- Grid FS --> <mongo:mapping-converter id="converter" /> <bean name="gridFsTemplate" class="org.springframework.data.mongodb.gridfs.GridFsTemplate"> <constructor-arg ref="mongoDbFactory" /> <constructor-arg ref="converter" /> </bean> </beans>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy