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
|
|
28
|
<!-- security -->
|
29
|
<bean id="passwordEncoder" class="org.springframework.security.authentication.encoding.Md5PasswordEncoder"/>
|
30
|
<bean id="saltSource" class="org.springframework.security.authentication.dao.ReflectionSaltSource">
|
31
|
<property name="userPropertyToUse" value="getUsername"/>
|
32
|
</bean>
|
33
|
<bean id="daoAuthenticationProvider" class="org.springframework.security.authentication.dao.DaoAuthenticationProvider">
|
34
|
<property name="userDetailsService" ref="userService"/>
|
35
|
<property name="saltSource" ref="saltSource"/>
|
36
|
<property name="passwordEncoder" ref="passwordEncoder"/>
|
37
|
</bean>
|
38
|
<bean id="authenticationManager" class="org.springframework.security.authentication.ProviderManager">
|
39
|
<constructor-arg>
|
40
|
<list>
|
41
|
<bean class="org.springframework.security.authentication.TestingAuthenticationProvider"/>
|
42
|
<ref local="daoAuthenticationProvider"/>
|
43
|
</list>
|
44
|
</constructor-arg>
|
45
|
</bean>
|
46
|
|
47
|
</beans>
|