Revision 87f35b2d
Added by Andreas Kohlbecker over 6 years ago
src/test/resources/webapp/WEB-INF/applicationContext.xml | ||
---|---|---|
1 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 | 2 |
<beans xmlns="http://www.springframework.org/schema/beans" |
3 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
4 |
xmlns:tx="http://www.springframework.org/schema/tx" |
|
5 |
xmlns:context="http://www.springframework.org/schema/context" |
|
6 |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd |
|
7 |
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd |
|
8 |
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd |
|
9 |
"> |
|
10 |
|
|
11 |
<!-- |
|
12 |
NOTE: |
|
13 |
For a detailed overview on the spring MVC and application context configuration and |
|
14 |
bootstrapping of this web application see: |
|
15 |
http://dev.e-taxonomy.eu/trac/wiki/cdmlib-remote-webappConfigurationAndBootstrapping |
|
16 |
--> |
|
17 |
|
|
18 |
<context:annotation-config /> |
|
19 |
|
|
20 |
<!-- |
|
21 |
find the eu.etaxonomy.cdm.remote.config.CdmVaadinConfiguration |
|
22 |
--> |
|
23 |
<context:component-scan base-package="eu/etaxonomy/cdm/addon/config" /> |
|
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 |
|
10 |
"> |
|
11 |
|
|
12 |
<context:property-override location="classpath:override.properties"/> |
|
24 | 13 |
|
25 |
<!-- include default application context and customization --> |
|
26 |
<import resource="classpath:/eu/etaxonomy/cdm/defaultApplicationContext.xml"/> |
|
27 |
|
|
28 |
<bean id="dataSource" class="org.unitils.database.UnitilsDataSourceFactoryBean"/> |
|
29 |
|
|
30 |
<bean id="persistentTermInitializer" class="eu.etaxonomy.cdm.database.PersistentTermInitializer"> |
|
31 |
<property name="omit" value="true" /> |
|
32 |
</bean> |
|
33 |
<context:component-scan base-package="eu/etaxonomy/cdm/ext" /> |
|
34 |
|
|
35 |
<!-- <import resource="classpath:/eu/etaxonomy/cdm/remote.xml"/> --> |
|
36 |
<!-- <context:component-scan base-package="eu/etaxonomy/cdm/io"> |
|
37 |
<context:exclude-filter type="regex" expression="eu\.etaxonomy\.cdm\.io\.pesi.*" /> |
|
38 |
<context:exclude-filter type="regex" expression="eu\.etaxonomy\.cdm\.io\.faunaEuropaea.*" /> |
|
39 |
<context:exclude-filter type="regex" expression="eu\.etaxonomy\.cdm\.io\.erms.*" /> |
|
40 |
<context:exclude-filter type="regex" expression="eu\.etaxonomy\.cdm\.io\.eflora.*" /> |
|
41 |
<context:exclude-filter type="regex" expression="eu\.etaxonomy\.cdm\.io\.berlinModel.*" /> |
|
42 |
</context:component-scan> --> |
|
43 |
|
|
44 |
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> |
|
45 |
<property name="properties"> |
|
46 |
<props> |
|
47 |
<prop key="eu.etaxonomy.cdm.base.path">${user.home}/.cdmLibrary/</prop> |
|
48 |
<prop key="eu.etaxonomy.cdm.search.index.path">${user.home}/.cdmLibrary/index/</prop> |
|
49 |
</props> |
|
50 |
</property> |
|
51 |
</bean> |
|
14 |
<context:component-scan base-package="eu/etaxonomy/cdm/api/config" /> |
|
15 |
|
|
16 |
<context:component-scan base-package="eu/etaxonomy/cdm/api/service"> |
|
17 |
</context:component-scan> |
|
18 |
|
|
19 |
<context:component-scan base-package="eu/etaxonomy/cdm/api/application"> |
|
20 |
</context:component-scan> |
|
21 |
|
|
22 |
<import resource="classpath:/eu/etaxonomy/cdm/services.xml"/> |
|
52 | 23 |
|
24 |
<context:component-scan base-package="eu/etaxonomy/cdm/api/cache"/> |
|
53 | 25 |
<!-- enable the configuration of transactional behavior based on annotations --> |
54 | 26 |
<tx:annotation-driven transaction-manager="transactionManager"/> |
55 |
|
|
56 |
<import resource="classpath:/eu/etaxonomy/cdm/applicationContext-test.common.xml" /> |
|
57 |
|
|
58 |
<bean id="termInitializer" class="eu.etaxonomy.cdm.database.TestingTermInitializer"> |
|
59 |
<property name="termsDataSet" value="classpath:/eu/etaxonomy/cdm/database/TermsDataSet-ui-registration-with_auditing_info.xml"/> |
|
60 |
<property name="termsDtd" value="classpath:/eu/etaxonomy/cdm/database/schema/dataset.dtd"/> |
|
27 |
|
|
28 |
<bean id="dataSource" class="org.unitils.database.UnitilsDataSourceFactoryBean"/> |
|
29 |
|
|
30 |
<bean id="persistentTermInitializer" class="eu.etaxonomy.cdm.database.PersistentTermInitializer"> |
|
31 |
<property name="omit" value="false"/> |
|
61 | 32 |
</bean> |
62 |
|
|
63 |
</beans> |
|
33 |
|
|
34 |
<bean id="hibernateProperties" |
|
35 |
class="org.springframework.beans.factory.config.PropertiesFactoryBean"> |
|
36 |
<property name="properties"> |
|
37 |
<props> |
|
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> |
|
43 |
</props> |
|
44 |
</property> |
|
45 |
</bean> |
|
46 |
|
|
47 |
<bean id="tableGeneratorGlobalOverride" |
|
48 |
class="eu.etaxonomy.cdm.persistence.hibernate.TableGeneratorGlobalOverride"> |
|
49 |
<property name="properties"> |
|
50 |
<props> |
|
51 |
<!-- |
|
52 |
globally overriding id generation settings see: eu.etaxonomy.cdm.persistence.hibernate.TableGenerator |
|
53 |
--> |
|
54 |
<prop key="optimizer">none</prop> |
|
55 |
<prop key="initial_value">5000</prop><!-- must be higher than any term id in TermsDataSet.xml --> |
|
56 |
</props> |
|
57 |
</property> |
|
58 |
</bean> |
|
59 |
|
|
60 |
|
|
61 |
<!-- |
|
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"/> |
|
68 |
</bean> --> |
|
69 |
|
|
70 |
<bean id="validatorFactory" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean"> |
|
71 |
<property name="mappingLocations"> |
|
72 |
<set> |
|
73 |
<value>classpath:/eu/etaxonomy/cdm/validation/name/TaxonName-Constraints.xml</value> |
|
74 |
</set> |
|
75 |
</property> |
|
76 |
</bean> |
|
77 |
|
|
78 |
|
|
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" /> |
|
81 |
|
|
82 |
<!-- security --> |
|
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"/> |
|
86 |
</bean> |
|
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"/> |
|
91 |
</bean> |
|
92 |
<bean id="authenticationManager" class="org.springframework.security.authentication.ProviderManager"> |
|
93 |
<constructor-arg> |
|
94 |
<list> |
|
95 |
<ref local="daoAuthenticationProvider"/> |
|
96 |
</list> |
|
97 |
</constructor-arg> |
|
98 |
<!-- <property name="providers"> --> |
|
99 |
<!-- <list> --> |
|
100 |
<!-- <bean class="org.springframework.security.authentication.TestingAuthenticationProvider"/> --> |
|
101 |
<!-- <ref local="daoAuthenticationProvider"/> --> |
|
102 |
<!-- </list> --> |
|
103 |
<!-- </property> --> |
|
104 |
</bean> |
|
105 |
|
|
106 |
</beans> |
Also available in: Unified diff
fxing problems in testsetup: