1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
3
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
4
|
xmlns:context="http://www.springframework.org/schema/context"
|
5
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
6
|
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
|
7
|
http://www.springframework.org/schema/context
|
8
|
http://www.springframework.org/schema/context/spring-context-2.5.xsd">
|
9
|
|
10
|
<bean id="dataSource" lazy-init="true" class="eu.etaxonomy.cdm.database.UpdatableRoutingDataSource">
|
11
|
<property name="targetDataSources">
|
12
|
<map key-type="java.lang.String">
|
13
|
<entry key="empty_default" value-ref="empty_defaultDataSource"/>
|
14
|
</map>
|
15
|
</property>
|
16
|
<property name="defaultTargetDataSource" ref="empty_defaultDataSource"/>
|
17
|
</bean>
|
18
|
|
19
|
<bean id="empty_defaultDataSource" lazy-init="true" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
|
20
|
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
|
21
|
<property name="username" value="${local.usr}"/>
|
22
|
<property name="password" value="${local.pwd}"/>
|
23
|
<property name="url" value="jdbc:mysql://${local.host}/cdm_empty_default"/>
|
24
|
</bean>
|
25
|
|
26
|
<!-- This configures default properties, which can overridden with the file specified by the location property -->
|
27
|
<bean id="hibernateProperties"
|
28
|
class="org.springframework.beans.factory.config.PropertiesFactoryBean">
|
29
|
<property name="properties">
|
30
|
<props>
|
31
|
<prop key="hibernate.hbm2ddl.auto">validate</prop>
|
32
|
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
|
33
|
<prop key="hibernate.cache.provider_class">org.hibernate.cache.NoCacheProvider</prop>
|
34
|
<prop key="hibernate.show_sql">false</prop>
|
35
|
<prop key="hibernate.format_sql">false</prop>
|
36
|
</props>
|
37
|
</property>
|
38
|
</bean>
|
39
|
|
40
|
</beans>
|