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
12 <context:property-override location=
"classpath:override.properties"/>
14 <context:component-scan base-package=
"eu/etaxonomy/cdm/api/config" />
16 <context:component-scan base-package=
"eu/etaxonomy/cdm/api/service">
17 </context:component-scan>
19 <context:component-scan base-package=
"eu/etaxonomy/cdm/api/application">
20 </context:component-scan>
22 <import resource=
"classpath:/eu/etaxonomy/cdm/services.xml"/>
24 <context:component-scan base-package=
"eu/etaxonomy/cdm/api/cache"/>
25 <!-- enable the configuration of transactional behavior based on annotations -->
26 <tx:annotation-driven transaction-manager=
"transactionManager"/>
28 <bean id=
"dataSource" class=
"org.unitils.database.UnitilsDataSourceFactoryBean"/>
30 <bean id=
"persistentTermInitializer" class=
"eu.etaxonomy.cdm.database.PersistentTermInitializer">
31 <property name=
"omit" value=
"false"/>
34 <bean id=
"hibernateProperties"
35 class=
"org.springframework.beans.factory.config.PropertiesFactoryBean">
36 <property name=
"properties">
38 <prop key=
"hibernate.cache.region.factory_class">org.hibernate.cache.internal.NoCachingRegionFactory
</prop>
39 <prop key=
"hibernate.show_sql">false
</prop>
40 <prop key=
"hibernate.format_sql">false
</prop>
41 <prop key=
"hibernate.search.autoregister_listeners">false
</prop>
42 <prop key=
"hibernate.jdbc.batch_size">0</prop>
47 <bean id=
"tableGeneratorGlobalOverride"
48 class=
"eu.etaxonomy.cdm.persistence.hibernate.TableGeneratorGlobalOverride">
49 <property name=
"properties">
52 globally overriding id generation settings see: eu.etaxonomy.cdm.persistence.hibernate.TableGenerator
54 <prop key=
"optimizer">none
</prop>
55 <prop key=
"initial_value">5000</prop><!-- must be higher than any term id in TermsDataSet.xml -->
62 We do not use spelling suggestions anymore. This one relates to spring modules which is
63 somewhat out-dated. Once we work again with spelling suggestions we better use a modern
64 approach, e.g. annotation based.
65 <bean id="taxonSpellingDirectory" class="org.springmodules.lucene.index.support.FSDirectoryFactoryBean">
66 <property name="location" value="file:./target/index/eu.etaxonomy.cdm.model.taxon.TaxonBase_spelling"/>
67 <property name="create" value="true"/>
70 <bean id=
"validatorFactory" class=
"org.springframework.validation.beanvalidation.LocalValidatorFactoryBean">
71 <property name=
"mappingLocations">
73 <value>classpath:/eu/etaxonomy/cdm/validation/name/TaxonName-Constraints.xml
</value>
79 <!-- equips a new and empty database with the initial set of meta data and admin user -->
80 <bean id=
"firstDataInserter" class=
"eu.etaxonomy.cdm.api.application.FirstDataInserter" />
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">
95 <ref local=
"daoAuthenticationProvider"/>
98 <!-- <property name="providers"> -->
100 <!-- <bean class="org.springframework.security.authentication.TestingAuthenticationProvider"/> -->
101 <!-- <ref local="daoAuthenticationProvider"/> -->