Project

General

Profile

Download (4.69 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/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
9
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
10
    ">
11

    
12
    <context:property-override location="classpath:override.properties"/>
13

    
14
    <context:component-scan base-package="eu/etaxonomy/cdm/api/service">
15
    </context:component-scan>
16
    
17
    <context:component-scan base-package="eu/etaxonomy/cdm/api/application">
18
    </context:component-scan>    
19

    
20
    <import resource="classpath:/eu/etaxonomy/cdm/services.xml"/>
21

    
22
	<context:component-scan base-package="eu/etaxonomy/cdm/api/cache"/>
23
    <!-- enable the configuration of transactional behavior based on annotations -->
24
    <tx:annotation-driven transaction-manager="transactionManager"/>
25

    
26
    <bean id="dataSource" class="org.unitils.database.UnitilsDataSourceFactoryBean"/>
27

    
28
    <bean id="persistentTermInitializer" class="eu.etaxonomy.cdm.database.PersistentTermInitializer">
29
        <property name="omit" value="false"/>
30
    </bean>
31

    
32
    <bean id="hibernateProperties"
33
        class="org.springframework.beans.factory.config.PropertiesFactoryBean">
34
        <property name="properties">
35
            <props>
36
                <prop key="hibernate.cache.region.factory_class">org.hibernate.cache.internal.NoCachingRegionFactory</prop>
37
                <prop key="hibernate.show_sql">false</prop>
38
                <prop key="hibernate.format_sql">false</prop>
39
                <prop key="hibernate.search.autoregister_listeners">false</prop>
40
                <prop key="hibernate.jdbc.batch_size">0</prop>
41
            </props>
42
        </property>
43
    </bean>
44

    
45
    <bean id="tableGeneratorGlobalOverride"
46
        class="eu.etaxonomy.cdm.persistence.hibernate.TableGeneratorGlobalOverride">
47
        <property name="properties">
48
            <props>
49
                <!--
50
                    globally overriding id generation settings see: eu.etaxonomy.cdm.persistence.hibernate.TableGenerator
51
                 -->
52
                <prop key="optimizer">none</prop>
53
                <prop key="initial_value">5000</prop><!-- must be higher than any term id in TermsDataSet.xml -->
54
            </props>
55
        </property>
56
    </bean>
57

    
58

    
59
<!--
60
   We do not use spelling suggestions anymore. This one relates to spring modules which is
61
    somewhat out-dated. Once we work again with spelling suggestions we better use a modern
62
    approach, e.g. annotation based.
63
    <bean id="taxonSpellingDirectory" class="org.springmodules.lucene.index.support.FSDirectoryFactoryBean">
64
      <property name="location" value="file:./target/index/eu.etaxonomy.cdm.model.taxon.TaxonBase_spelling"/>
65
      <property name="create" value="true"/>
66
    </bean> -->
67

    
68
    <bean id="validatorFactory" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean">
69
        <property name="mappingLocations">
70
            <set>
71
                <value>classpath:/eu/etaxonomy/cdm/validation/name/TaxonNameBase-Constraints.xml</value>
72
            </set>
73
        </property>
74
    </bean>
75

    
76

    
77
    <!-- equips a new and empty database with the initial set of meta data and admin user   -->
78
    <bean id="firstDataInserter" class="eu.etaxonomy.cdm.api.application.FirstDataInserter" />
79

    
80
    <!-- security  -->
81
    <bean id="passwordEncoder" class="org.springframework.security.authentication.encoding.Md5PasswordEncoder"/>
82
    <bean id="saltSource" class="org.springframework.security.authentication.dao.ReflectionSaltSource">
83
        <property name="userPropertyToUse" value="getUsername"/>
84
    </bean>
85
    <bean id="daoAuthenticationProvider" class="org.springframework.security.authentication.dao.DaoAuthenticationProvider">
86
        <property name="userDetailsService" ref="userService"/>
87
        <property name="saltSource" ref="saltSource"/>
88
        <property name="passwordEncoder" ref="passwordEncoder"/>
89
    </bean>
90
    <bean id="authenticationManager" class="org.springframework.security.authentication.ProviderManager">
91
        <property name="providers">
92
            <list>
93
                <bean class="org.springframework.security.authentication.TestingAuthenticationProvider"/>
94
                <ref local="daoAuthenticationProvider"/>
95
            </list>
96
        </property>
97
    </bean>
98

    
99
</beans>
    (1-1/1)