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 <context:property-override location=
"classpath:override.properties"/>
13 <context:component-scan base-package=
"eu/etaxonomy/cdm/api/service">
14 </context:component-scan>
16 <import resource=
"classpath:/eu/etaxonomy/cdm/services.xml"/>
18 <!-- enable the configuration of transactional behavior based on annotations -->
19 <tx:annotation-driven transaction-manager=
"transactionManager"/>
21 <bean id=
"dataSource" class=
"org.unitils.database.UnitilsDataSourceFactoryBean"/>
24 use TestingTermInitializer
26 <bean id=
"testingTermInitializer" class=
"eu.etaxonomy.cdm.database.TestingTermInitializer">
27 <property name=
"termsDataSet" value=
"classpath:/eu/etaxonomy/cdm/database/TermsDataSet-with_auditing_info.xml"/>
28 <property name=
"termsDtd" value=
"classpath:/eu/etaxonomy/cdm/persistence/dao/hibernate/dataset.dtd"/>
29 <property name=
"omit" value=
"false"/>
31 <bean id=
"persistentTermInitializer" class=
"eu.etaxonomy.cdm.database.PersistentTermInitializer">
32 <property name=
"omit" value=
"true"/>
35 <bean id=
"hibernateProperties"
36 class=
"org.springframework.beans.factory.config.PropertiesFactoryBean">
37 <property name=
"properties">
39 <prop key=
"hibernate.cache.provider_class">org.hibernate.cache.NoCacheProvider
</prop>
40 <prop key=
"hibernate.show_sql">false
</prop>
41 <prop key=
"hibernate.format_sql">false
</prop>
42 <prop key=
"hibernate.search.default.directory_provider">org.hibernate.search.store.FSDirectoryProvider
</prop>
43 <!-- TODO trying to use a managed session context
44 <prop key="hibernate.current_session_context_class">managed</prop>
46 <prop key=
"hibernate.search.default.indexBase">./target/index
</prop>
47 <!-- hsqldb v. <1.9 has a bug (http://sourceforge.net/tracker/?func=detail&atid=378131&aid=1407528&group_id=23316)
48 due to which it is not possible to use batch updates, so we need to disable
49 hibernate batching when using hsqldb in the app context: -->
50 <prop key=
"hibernate.jdbc.batch_size">0</prop>
55 <bean id=
"tableGeneratorGlobalOverride"
56 class=
"eu.etaxonomy.cdm.persistence.hibernate.TableGeneratorGlobalOverride">
57 <property name=
"properties">
60 globally overriding id generation settings see: eu.etaxonomy.cdm.persistence.hibernate.TableGenerator
62 <prop key=
"optimizer">none
</prop>
63 <prop key=
"initial_value">1000</prop>
69 <bean id=
"taxonSpellingDirectory" class=
"org.springmodules.lucene.index.support.FSDirectoryFactoryBean">
70 <property name=
"location" value=
"file:./target/index/eu.etaxonomy.cdm.model.taxon.TaxonBase_spelling"/>
71 <property name=
"create" value=
"true"/>
74 <bean id=
"validatorFactory" class=
"org.springframework.validation.beanvalidation.LocalValidatorFactoryBean">
75 <property name=
"mappingLocations">
77 <value>classpath:/eu/etaxonomy/cdm/validation/name/TaxonNameBase-Constraints.xml
</value>
83 <bean id=
"passwordEncoder" class=
"org.springframework.security.authentication.encoding.Md5PasswordEncoder"/>
84 <bean id=
"saltSource" class=
"org.springframework.security.authentication.dao.ReflectionSaltSource">
85 <property name=
"userPropertyToUse" value=
"getUsername"/>
87 <bean id=
"daoAuthenticationProvider" class=
"org.springframework.security.authentication.dao.DaoAuthenticationProvider">
88 <property name=
"userDetailsService" ref=
"userService"/>
89 <property name=
"saltSource" ref=
"saltSource"/>
90 <property name=
"passwordEncoder" ref=
"passwordEncoder"/>
92 <bean id=
"authenticationManager" class=
"org.springframework.security.authentication.ProviderManager">
93 <property name=
"providers">
95 <bean class=
"org.springframework.security.authentication.TestingAuthenticationProvider"/>
96 <ref local=
"daoAuthenticationProvider"/>