Project

General

Profile

Download (4.58 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
    <import resource="classpath:/eu/etaxonomy/cdm/services.xml"/>
18

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

    
23
    <bean id="dataSource" class="org.unitils.database.UnitilsDataSourceFactoryBean"/>
24

    
25
    <bean id="persistentTermInitializer" class="eu.etaxonomy.cdm.database.PersistentTermInitializer">
26
        <property name="omit" value="false"/>
27
    </bean>
28

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

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

    
55

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

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

    
73

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

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

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