cdmlib / cdmlib-io / src / test / resources / eu / etaxonomy / cdm / applicationContext-test.xml @ 54b39f00
History | View | Annotate | Download (4.44 KB)
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 |
xsi:schemaLocation="http://www.springframework.org/schema/beans |
6 |
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
7 |
http://www.springframework.org/schema/context
|
8 |
http://www.springframework.org/schema/context/spring-context-3.0.xsd"> |
9 |
|
10 |
<import resource="classpath:/eu/etaxonomy/cdm/defaultIoApplicationContext.xml"/> |
11 |
|
12 |
<!--
|
13 |
use TestingTermInitializer
|
14 |
-->
|
15 |
<!-- exclude persistent term initializer as we want to use the TestingTermInitializer instead -->
|
16 |
<context:component-scan base-package="eu/etaxonomy/cdm"> |
17 |
<context:exclude-filter type="regex" expression="eu\.etaxonomy\.cdm\.database\.PersistentTermInitializer"/> |
18 |
</context:component-scan>
|
19 |
<bean id="testingTermInitializer" class="eu.etaxonomy.cdm.database.TestingTermInitializer"> |
20 |
<property name="termsDataSet" value="classpath:/eu/etaxonomy/cdm/database/TermsDataSet-with_auditing_info.xml"/> |
21 |
<property name="termsDtd" value="classpath:/eu/etaxonomy/cdm/persistence/dao/hibernate/dataset.dtd"/> |
22 |
<property name="omit" value="false"/> |
23 |
</bean>
|
24 |
<!-- TODO remove <bean id="persistentTermInitializer" class="eu.etaxonomy.cdm.database.PersistentTermInitializer">
|
25 |
<property name="omit" value="true"/>
|
26 |
</bean> -->
|
27 |
|
28 |
|
29 |
<!--
|
30 |
NOTE:
|
31 |
the database connection is configured in /cdmlib-persistence/src/test/resources/unitils.properties
|
32 |
-->
|
33 |
<bean id="dataSource" class="org.unitils.database.UnitilsDataSourceFactoryBean"/> |
34 |
|
35 |
<bean id="hibernateProperties" |
36 |
class="org.springframework.beans.factory.config.PropertiesFactoryBean"> |
37 |
<property name="properties"> |
38 |
<props>
|
39 |
<prop key="hibernate.cache.region.factory_class">org.hibernate.cache.internal.NoCachingRegionFactory</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.impl.FSDirectoryProvider</prop> |
43 |
<!-- hibernate.search.default.exclusive_index_use=false
|
44 |
locks must not only be released after application shutdown in test environment -->
|
45 |
<prop key="hibernate.search.default.exclusive_index_use">false</prop> |
46 |
<prop key="hibernate.search.default.indexBase">./target/index</prop> |
47 |
</props>
|
48 |
</property>
|
49 |
</bean>
|
50 |
|
51 |
<bean id="tableGeneratorGlobalOverride" |
52 |
class="eu.etaxonomy.cdm.persistence.hibernate.TableGeneratorGlobalOverride"> |
53 |
<property name="properties"> |
54 |
<props>
|
55 |
<!-- globally overriding id generation settings see: eu.etaxonomy.cdm.persistence.hibernate.TableGenerator -->
|
56 |
<prop key="optimizer">none</prop> |
57 |
<prop key="initial_value">5000</prop><!-- must be higher than any term id in TermsDataSet.xml --> |
58 |
</props>
|
59 |
</property>
|
60 |
</bean>
|
61 |
|
62 |
|
63 |
<!-- <bean id="taxonSpellingDirectory" class="org.springmodules.lucene.index.support.FSDirectoryFactoryBean">
|
64 |
<property name="location" value="file:./target/test-classes/eu.etaxonomy.cdm.model.taxon.TaxonBase_spelling"/>
|
65 |
<property name="create" value="true"/>
|
66 |
</bean>
|
67 |
|
68 |
<bean id="taxonSpellingIndex" class="org.springmodules.lucene.index.support.SimpleIndexFactoryBean">
|
69 |
<property name="directory" ref="taxonSpellingDirectory"/>
|
70 |
<property name="create" value="true"/>
|
71 |
<property name="analyzer">
|
72 |
<bean class="org.apache.lucene.analysis.SimpleAnalyzer"/>
|
73 |
</property>
|
74 |
</bean> -->
|
75 |
|
76 |
<bean id="authenticationManager" class="org.springframework.security.authentication.ProviderManager"> |
77 |
<property name="providers"> |
78 |
<list>
|
79 |
<bean class="org.springframework.security.authentication.TestingAuthenticationProvider"/> |
80 |
</list>
|
81 |
</property>
|
82 |
</bean>
|
83 |
|
84 |
<bean id="passwordEncoder" class="org.springframework.security.authentication.encoding.Md5PasswordEncoder"/> |
85 |
|
86 |
<bean id="saltSource" class="org.springframework.security.authentication.dao.ReflectionSaltSource"> |
87 |
<property name="userPropertyToUse" value="getUsername"/> |
88 |
</bean>
|
89 |
|
90 |
</beans>
|