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"/>
13 <context:component-scan base-package=
"eu/etaxonomy/cdm/api"/>
15 <!-- enable the configuration of transactional behavior based on annotations -->
16 <tx:annotation-driven transaction-manager=
"transactionManager"/>
18 <bean id=
"sessionFactory" class=
"org.springframework.orm.hibernate3.LocalSessionFactoryBean">
19 <property name=
"namingStrategy">
20 <bean class=
"org.hibernate.cfg.DefaultComponentSafeNamingStrategy" />
23 <!-- <property name="entityInterceptor">
24 <bean class="eu.etaxonomy.cdm.persistence.hibernate.CdmHibernateInterceptor" />
27 <property name=
"configLocation" value=
"classpath:eu/etaxonomy/cdm/hibernate.cfg.xml"/>
28 <property name=
"configurationClass" value=
"org.hibernate.cfg.AnnotationConfiguration"/>
29 <property name=
"dataSource" ref=
"dataSource"/>
30 <property name=
"hibernateProperties" ref=
"hibernateProperties"/>
34 <bean id=
"dataSource" class=
"org.unitils.database.UnitilsDataSourceFactoryBean"/>
36 <bean id=
"hibernateProperties"
37 class=
"org.springframework.beans.factory.config.PropertiesFactoryBean">
38 <property name=
"properties">
40 <prop key=
"hibernate.dialect">org.hibernate.dialect.HSQLCorrectedDialect
</prop>
41 <prop key=
"hibernate.cache.provider_class">org.hibernate.cache.NoCacheProvider
</prop>
42 <!-- TODO trying to use a managed session context -->
43 <prop key=
"hibernate.current_session_context_class">managed
</prop>
44 <prop key=
"hibernate.show_sql">false
</prop>
45 <prop key=
"hibernate.format_sql">false
</prop>
46 <prop key=
"hibernate.search.default.directory_provider">org.hibernate.search.store.FSDirectoryProvider
</prop>
47 <prop key=
"hibernate.search.default.indexBase">./target/test-classes
</prop>
52 <bean id=
"authenticationManager" class=
"org.springframework.security.providers.ProviderManager">
53 <property name=
"providers">
55 <bean class=
"org.springframework.security.providers.TestingAuthenticationProvider"/>
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"/>