Project

General

Profile

Download (3.13 KB) Statistics
| Branch: | Tag: | Revision:
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
	xmlns:tx="http://www.springframework.org/schema/tx"
6
	xsi:schemaLocation="http://www.springframework.org/schema/beans 
7
    http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
8
    http://www.springframework.org/schema/context
9
    http://www.springframework.org/schema/context/spring-context-2.5.xsd
10
    http://www.springframework.org/schema/tx 
11
    http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
12

    
13
    <!-- requires at least spring 2.5.4 <context:property-override location="classpath:eu/etaxonomy/cdm/persistence/override.properties"/>-->
14

    
15
    <bean id="dataSource" class="org.unitils.database.UnitilsDataSourceFactoryBean"/>
16
 
17
    <!-- exclude persistent term initializer as we want to use the TestingTermInitializer instead -->   
18
    <context:component-scan base-package="eu/etaxonomy/cdm">
19
      <context:exclude-filter type="regex" expression="eu\.etaxonomy\.cdm\.database\.PersistentTermInitializer"/>
20
    </context:component-scan>
21
    
22
    <bean id="authenticationManager" class="org.springframework.security.authentication.ProviderManager">
23
        <property name="providers">
24
            <list>
25
                <bean class="org.springframework.security.authentication.TestingAuthenticationProvider"/>
26
            </list>
27
        </property>
28
    </bean>
29
    
30
    <!-- enable the configuration of transactional behavior based on annotations -->
31
    <tx:annotation-driven transaction-manager="transactionManager"/>      
32
    
33
    <bean id="termInitializer" class="eu.etaxonomy.cdm.database.TestingTermInitializer">
34
        <property name="termsDataSet" value="classpath:/eu/etaxonomy/cdm/database/TermsDataSet-with_auditing_info.xml"/>
35
        <property name="termsDtd" value="classpath:/eu/etaxonomy/cdm/persistence/dao/hibernate/dataset.dtd"/>
36
    </bean>
37
    
38
    <bean id="hibernateProperties" 
39
        class="org.springframework.beans.factory.config.PropertiesFactoryBean">
40
        <property name="properties">
41
            <props>
42
                <prop key="hibernate.dialect">org.hibernate.dialect.HSQLCorrectedDialect</prop>
43
                <prop key="hibernate.cache.provider_class">org.hibernate.cache.NoCacheProvider</prop>
44
                <prop key="hibernate.show_sql">false</prop>
45
                <prop key="hibernate.format_sql">false</prop>
46
                <prop key="hibernate.search.default.directory_provider">org.hibernate.search.store.FSDirectoryProvider</prop>
47
                <prop key="hibernate.search.default.indexBase">./target/test-classes</prop>
48
            </props>
49
        </property>
50
    </bean> 
51
    
52
 <bean id="taxonSpellingDirectory" class="org.springmodules.lucene.index.support.FSDirectoryFactoryBean">
53
      <property name="location" value="file:./target/test-classes/eu.etaxonomy.cdm.model.taxon.TaxonBase_spelling"/>
54
      <property name="create" value="false"/>
55
    </bean>
56

    
57
    
58
    <import resource="classpath:/eu/etaxonomy/cdm/persistence.xml" />
59
 
60
</beans>
(1-1/6)