Project

General

Profile

« Previous | Next » 

Revision 57909

Replacing XML with Java configuration

View differences:

applicationContext.xml
67 67
        </property>
68 68
    </bean>
69 69

  
70
    <bean id="repomanager.dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
71
        <property name="driverClassName" value="${repomanager.db.driverClassName}" />
72
        <property name="url" value="${repomanager.db.url}" />
73
        <property name="username" value="${repomanager.db.username}" />
74
        <property name="password" value="${repomanager.db.password}" />
75
        <property name="maxIdle" value="10" />
76
        <property name="maxActive" value="100" />
77
        <property name="maxWait" value="10000" />
78
        <property name="validationQuery" value="SELECT 1;" />
79
        <property name="testOnBorrow" value="true" />
80
        <property name="testOnReturn" value="true" />
81
        <property name="testWhileIdle" value="true" />
82
        <property name="timeBetweenEvictionRunsMillis" value="1200000" />
83
        <property name="minEvictableIdleTimeMillis" value="1800000" />
84
        <property name="numTestsPerEvictionRun" value="5" />
85
        <property name="poolPreparedStatements" value="true" />
86
        <property name="defaultAutoCommit" value="true" />
87
    </bean>
88

  
89
    <tx:annotation-driven transaction-manager="txManager"/>
90

  
91
    <bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
92
        <property name="dataSource" ref="repomanager.dataSource"/>
93
    </bean>
94

  
95
    <mvc:resources mapping="swagger-ui.html" location="classpath:/META-INF/resources/"/>
96
    <mvc:resources mapping="/webjars/**" location="classpath:/META-INF/resources/webjars/"/>
97
    <bean class="eu.dnetlib.repo.manager.config.SwaggerConfig"/>
98

  
99 70
</beans>

Also available in: Unified diff