Project

General

Profile

« Previous | Next » 

Revision 57909

Replacing XML with Java configuration

View differences:

application-context.xml
8 8

  
9 9
    <context:annotation-config/>
10 10
    <context:component-scan base-package="eu.dnetlib.repo.manager.service.*"/>
11
    <tx:annotation-driven transaction-manager="txManager"/>
12 11

  
13 12
    <bean class="eu.dnetlib.repo.manager.config.CascadingPropertyLoader"
14 13
          id="propertyLoader">
......
27 26
                <value>classpath*:/eu/**/springContext-*.properties</value>
28 27

  
29 28
                <value>classpath*:/application.properties</value>
30
                <value>classpath*:/email-texts.properties</value>
29
                <value>classpath*:email-texts.properties</value>
31 30

  
32
<!--                <value>classpath*:dnet-site-wizard.properties</value>-->
33
<!--                <value>classpath*:dnet-site-override.properties</value>-->
34
<!--                <value>classpath*:dnet-wizard.properties</value>-->
35
<!--                <value>classpath*:dnet-override-new.properties</value>-->
36
<!--                <value>classpath*:dnet-validator-wizard.properties</value>-->
37
<!--                <value>classpath*:dnet-validator-override.properties</value>-->
38
<!--                <value>classpath*:dnet-site-force-override.properties</value>-->
39
<!--                <value>classpath*:dnet-force-override.properties</value>-->
31
                <!--                <value>classpath*:dnet-site-wizard.properties</value>-->
32
                <!--                <value>classpath*:dnet-site-override.properties</value>-->
33
                <!--                <value>classpath*:dnet-wizard.properties</value>-->
34
                <!--                <value>classpath*:dnet-override.properties</value>-->
35
                <!--                <value>classpath*:dnet-validator-wizard.properties</value>-->
36
                <!--                <value>classpath*:dnet-validator-override.properties</value>-->
37
                <!--                <value>classpath*:dnet-site-force-override.properties</value>-->
38
                <!--                <value>classpath*:dnet-force-override.properties</value>-->
40 39
            </list>
41 40
        </property>
42 41
    </bean>
43

  
44
    <bean id="repomanager.dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
45
        <property name="driverClassName" value="${repomanager.db.driverClassName}" />
46
        <property name="url" value="${repomanager.db.url}" />
47
        <property name="username" value="${repomanager.db.username}" />
48
        <property name="password" value="${repomanager.db.password}" />
49
        <property name="maxIdle" value="10" />
50
        <property name="maxActive" value="100" />
51
        <property name="maxWait" value="10000" />
52
        <property name="validationQuery" value="SELECT 1;" />
53
        <property name="testOnBorrow" value="true" />
54
        <property name="testOnReturn" value="true" />
55
        <property name="testWhileIdle" value="true" />
56
        <property name="timeBetweenEvictionRunsMillis" value="1200000" />
57
        <property name="minEvictableIdleTimeMillis" value="1800000" />
58
        <property name="numTestsPerEvictionRun" value="5" />
59
        <property name="poolPreparedStatements" value="true" />
60
        <property name="defaultAutoCommit" value="true" />
61
    </bean>
62

  
63
    <bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
64
        <property name="dataSource" ref="repomanager.dataSource"/>
65
    </bean>
66

  
67 42
</beans>

Also available in: Unified diff