Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

cdmlib / cdmlib-ext / src / test / resources / eu / etaxonomy / cdm / applicationContext-test.xml @ f79378cc

History | View | Annotate | Download (2.39 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:component-scan base-package="eu/etaxonomy/cdm/ext"/>
13
  
14
    <!--  ====== should go into common app context configuration ===== -->
15
    
16
    <context:component-scan base-package="eu/etaxonomy/cdm/api/service"/>  
17
    <!-- in this context the CdmRepository can not be used since it autowires the authenticationManager which is not ready in time -->
18
    
19
    <bean id="dataSource" class="org.unitils.database.UnitilsDataSourceFactoryBean"/>
20
    
21
    <import resource="classpath:/eu/etaxonomy/cdm/applicationContext-test.common.xml" />
22
    
23
    <import resource="classpath:/eu/etaxonomy/cdm/persistence.xml" />
24
    <import resource="classpath:/eu/etaxonomy/cdm/services_base_test.xml"/>
25

    
26

    
27
    <!-- security  -->
28
    <bean id="passwordEncoder" class="org.springframework.security.authentication.encoding.Md5PasswordEncoder"/>
29
    <bean id="saltSource" class="org.springframework.security.authentication.dao.ReflectionSaltSource">
30
        <property name="userPropertyToUse" value="getUsername"/>
31
    </bean>
32
    <bean id="daoAuthenticationProvider" class="org.springframework.security.authentication.dao.DaoAuthenticationProvider">
33
        <property name="userDetailsService" ref="userService"/>
34
        <property name="saltSource" ref="saltSource"/>
35
        <property name="passwordEncoder" ref="passwordEncoder"/>
36
    </bean>
37
    <bean id="authenticationManager" class="org.springframework.security.authentication.ProviderManager">
38
        <constructor-arg>
39
            <list>
40
                <bean class="org.springframework.security.authentication.TestingAuthenticationProvider"/>
41
                <ref local="daoAuthenticationProvider"/>
42
            </list>
43
        </constructor-arg>
44
    </bean>
45
    <!--  ================================================================== -->
46
    
47
</beans>
Add picture from clipboard (Maximum size: 40 MB)