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">
11 <import resource=
"classpath:/eu/etaxonomy/cdm/services.xml"/>
12 <context:property-override location=
"classpath:override.properties"/>
14 <context:component-scan base-package=
"eu/etaxonomy/cdm/api"/>
16 <bean id=
"validatorFactory" class=
"org.springframework.validation.beanvalidation.LocalValidatorFactoryBean">
17 <property name=
"mappingLocations">
19 <value>classpath:/eu/etaxonomy/cdm/validation/name/TaxonNameBase-Constraints.xml
</value>
24 <!-- enable the configuration of transactional behavior based on annotations -->
25 <tx:annotation-driven transaction-manager=
"transactionManager"/>
27 <bean id=
"dataSource" class=
"org.unitils.database.UnitilsDataSourceFactoryBean"/>
29 <bean id=
"hibernateProperties"
30 class=
"org.springframework.beans.factory.config.PropertiesFactoryBean">
31 <property name=
"properties">
33 <prop key=
"hibernate.dialect">org.hibernate.dialect.HSQLCorrectedDialect
</prop>
34 <prop key=
"hibernate.cache.provider_class">org.hibernate.cache.NoCacheProvider
</prop>
35 <!-- TODO trying to use a managed session context -->
36 <prop key=
"hibernate.current_session_context_class">managed
</prop>
37 <prop key=
"hibernate.show_sql">false
</prop>
38 <prop key=
"hibernate.format_sql">false
</prop>
39 <prop key=
"hibernate.search.default.directory_provider">org.hibernate.search.store.FSDirectoryProvider
</prop>
40 <prop key=
"hibernate.search.default.indexBase">./target/test-classes
</prop>
45 <bean id=
"authenticationManager" class=
"org.springframework.security.providers.ProviderManager">
46 <property name=
"providers">
48 <bean class=
"org.springframework.security.providers.TestingAuthenticationProvider"/>
49 <ref local=
"daoAuthenticationProvider"/>
54 <bean id=
"daoAuthenticationProvider" class=
"org.springframework.security.providers.dao.DaoAuthenticationProvider">
55 <property name=
"userDetailsService" ref=
"userService"/>
56 <property name=
"saltSource" ref=
"saltSource"/>
57 <property name=
"passwordEncoder" ref=
"passwordEncoder"/>
60 <bean id=
"passwordEncoder" class=
"org.springframework.security.providers.encoding.Md5PasswordEncoder"/>
62 <bean id=
"saltSource" class=
"org.springframework.security.providers.dao.salt.ReflectionSaltSource">
63 <property name=
"userPropertyToUse" value=
"getUsername"/>