uoa-repository-manager-service/src/main/resources/application-context.xml

67 lines
3.5 KiB
XML

<?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:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
<context:annotation-config/>
<context:component-scan base-package="eu.dnetlib.repo.manager.service.*"/>
<tx:annotation-driven transaction-manager="txManager"/>
<bean class="eu.dnetlib.repo.manager.config.CascadingPropertyLoader"
id="propertyLoader">
<property name="order" value="2"/>
<property name="properties">
<bean class="eu.dnetlib.conf.WebappContextProperyFactory">
<property name="propertyFetcher">
<bean class="eu.dnetlib.conf.PropertyFetcher"/>
</property>
</bean>
</property>
<property name="ignoreUnresolvablePlaceholders" value="true"/>
<property name="locations">
<list>
<value>classpath*:/gr/**/springContext-*.properties</value>
<value>classpath*:/eu/**/springContext-*.properties</value>
<value>classpath*:/application.properties</value>
<value>classpath*:email-texts.properties</value>
<value>classpath*:dnet-site-wizard.properties</value>
<value>classpath*:dnet-site-override.properties</value>
<value>classpath*:dnet-wizard.properties</value>
<value>classpath*:dnet-override.properties</value>
<value>classpath*:dnet-validator-wizard.properties</value>
<value>classpath*:dnet-validator-override.properties</value>
<value>classpath*:dnet-site-force-override.properties</value>
<value>classpath*:dnet-force-override.properties</value>
</list>
</property>
</bean>
<bean id="repomanager.dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="${repomanager.db.driverClassName}" />
<property name="url" value="${repomanager.db.url}" />
<property name="username" value="${repomanager.db.username}" />
<property name="password" value="${repomanager.db.password}" />
<property name="maxIdle" value="10" />
<property name="maxActive" value="100" />
<property name="maxWait" value="10000" />
<property name="validationQuery" value="SELECT 1;" />
<property name="testOnBorrow" value="true" />
<property name="testOnReturn" value="true" />
<property name="testWhileIdle" value="true" />
<property name="timeBetweenEvictionRunsMillis" value="1200000" />
<property name="minEvictableIdleTimeMillis" value="1800000" />
<property name="numTestsPerEvictionRun" value="5" />
<property name="poolPreparedStatements" value="true" />
<property name="defaultAutoCommit" value="true" />
</bean>
<bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="repomanager.dataSource"/>
</bean>
</beans>