Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

cdmlib / cdmlib-services / src / test / resources / eu / etaxonomy / cdm / applicationContext-test.xml @ 2638be38

History | View | Annotate | Download (3.16 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-3.0.xsd
8
    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
9
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
10
    ">
11

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

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

    
20
    <bean id="dataSource" class="org.unitils.database.UnitilsDataSourceFactoryBean"/>
21
    
22
    <import resource="classpath:/eu/etaxonomy/cdm/applicationContext-test.common.xml" />
23
    
24
    <import resource="classpath:/eu/etaxonomy/cdm/persistence.xml" />
25
    <import resource="classpath:/eu/etaxonomy/cdm/services_base_test.xml"/>
26

    
27
    <context:component-scan base-package="eu/etaxonomy/cdm/api/cache"/>
28

    
29
    <bean id="tableGeneratorGlobalOverride"
30
        class="eu.etaxonomy.cdm.persistence.hibernate.TableGeneratorGlobalOverride">
31
        <property name="properties">
32
            <props>
33
                <!--
34
                    globally overriding id generation settings see: eu.etaxonomy.cdm.persistence.hibernate.TableGenerator
35
                 -->
36
                <prop key="optimizer">none</prop>
37
                <prop key="initial_value">5000</prop><!-- must be higher than any term id in TermsDataSet.xml -->
38
            </props>
39
        </property>
40
    </bean>
41

    
42

    
43
    <bean id="validatorFactory" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean">
44
        <property name="mappingLocations">
45
            <set>
46
                <value>classpath:/eu/etaxonomy/cdm/validation/name/TaxonNameBase-Constraints.xml</value>
47
            </set>
48
        </property>
49
    </bean>
50

    
51

    
52
    <!-- security  -->
53
    <bean id="passwordEncoder" class="org.springframework.security.authentication.encoding.Md5PasswordEncoder"/>
54
    <bean id="saltSource" class="org.springframework.security.authentication.dao.ReflectionSaltSource">
55
        <property name="userPropertyToUse" value="getUsername"/>
56
    </bean>
57
    <bean id="daoAuthenticationProvider" class="org.springframework.security.authentication.dao.DaoAuthenticationProvider">
58
        <property name="userDetailsService" ref="userService"/>
59
        <property name="saltSource" ref="saltSource"/>
60
        <property name="passwordEncoder" ref="passwordEncoder"/>
61
    </bean>
62
    <bean id="authenticationManager" class="org.springframework.security.authentication.ProviderManager">
63
        <constructor-arg>
64
            <list>
65
                <bean class="org.springframework.security.authentication.TestingAuthenticationProvider"/>
66
                <ref local="daoAuthenticationProvider"/>
67
            </list>
68
        </constructor-arg>
69
    </bean>
70

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