Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

cdm-vaadin / src / test / resources / webapp / WEB-INF / applicationContext.xml @ 52a59b6e

History | View | Annotate | Download (4.98 KB)

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/config" />
15

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

    
22
    <import resource="classpath:/eu/etaxonomy/cdm/services.xml"/>
23

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

    
28
    <bean id="dataSource" class="org.unitils.database.UnitilsDataSourceFactoryBean"/>
29

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

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

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

    
60

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

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

    
78

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

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

    
106
</beans>
Add picture from clipboard (Maximum size: 40 MB)