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" xmlns:
context=
"http://www.springframework.org/schema/context"
4 xmlns:
tx=
"http://www.springframework.org/schema/tx"
5 xsi:
schemaLocation=
"http://www.springframework.org/schema/beans
6 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
10 <context:component-scan base-package=
"eu/etaxonomy/cdm/remote" />
14 ======= HandlerMappings =======
17 first we try to find the controller using the simpleurlmapping, then
18 the classname this follows the principal of "convention over
22 class=
"org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping">
23 <property name=
"order" value=
"1" />
24 <property name=
"interceptors">
26 <!--<ref bean="contentNegociationHandlerInterceptor" /> -->
27 <ref bean=
"localeContextHandlerInterceptor" />
30 <property name=
"pathMatcher">
31 <!-- must match the pathMatcher as set in AnnotationMethodHandlerAdapter -->
32 <bean class=
"eu.etaxonomy.cdm.remote.controller.util.CdmAntPathMatcher" />
38 <bean class=
"org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
39 <property name=
"order" value=
"0" />
40 <property name=
"mappings">
42 <prop key=
"/index.do">urlFilenameViewController
</prop>
43 <prop key=
"/">welcomeFileViewController
</prop>
49 ======= HandlerAdapters =======
51 <bean class=
"org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
52 <property name=
"pathMatcher">
53 <!-- must match the pathMatcher as set in DefaultAnnotationHandlerMapping -->
54 <bean class=
"eu.etaxonomy.cdm.remote.controller.util.CdmAntPathMatcher" />
58 <!-- needed when using SimpleUrlHandlerMapping -->
60 class=
"org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter" />
64 ======= Remoting =======
67 <!-- <import resource="classpath:/eu/etaxonomy/cdm/httpInvokerServices.xml"/>-->
69 <!-- <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">-->
70 <!-- <property name="order" value="0" />-->
71 <!-- <property name="mappings">-->
73 <!-- Needed for spring remoting with the http invoker -->
74 <!-- <!-- The configuration of the services is imported from httpInvokerServices.xml -->-->
76 <!-- <prop key="/remoting/agent.service">httpAgentService</prop>-->
77 <!-- <prop key="/remoting/annotation.service">httpAnnotationService</prop>-->
78 <!-- <prop key="/remoting/auditevent.service">httpAuditEventService</prop>-->
79 <!-- <prop key="/remoting/classification.service">httpClassificationService</prop>-->
80 <!-- <prop key="/remoting/collection.service">httpCollectionService</prop>-->
81 <!-- <prop key="/remoting/common.service">httpCommonService</prop>-->
82 <!-- <prop key="/remoting/database.service">httpDatabaseService</prop>-->
83 <!-- <prop key="/remoting/description.service">httpDescriptionService</prop>-->
84 <!-- <prop key="/remoting/featurenode.service">httpFeatureNodeService</prop>-->
85 <!-- <prop key="/remoting/featuretree.service">httpFeatureTreeService</prop>-->
86 <!-- <prop key="/remoting/grantedauthority.service">httpGrantedAuthorityService</prop>-->
87 <!-- <prop key="/remoting/group.service">httpGroupService</prop>-->
88 <!-- <prop key="/remoting/identificationkey.service">httpIdentificationKeyService</prop>-->
89 <!-- <prop key="/remoting/location.service">httpLocationService</prop>-->
90 <!-- <prop key="/remoting/lsidauthority.service">httpLsidAuthorityService</prop> -->
91 <!-- <prop key="/remoting/lsiddata.service">httpLsidDataService</prop> -->
92 <!-- <prop key="/remoting/lsidmetadata.service">httpLsidMetadataService</prop> -->
93 <!-- <prop key="/remoting/marker.service">httpMarkerService</prop>-->
94 <!-- <prop key="/remoting/media.service">httpMediaService</prop>-->
95 <!-- <prop key="/remoting/name.service">httpNameService</prop>-->
96 <!-- <prop key="/remoting/occurrence.service">httpOccurrenceService</prop>-->
97 <!-- <prop key="/remoting/polytomouskeynode.service">httpPolytomousKeyNodeService</prop>-->
98 <!-- <prop key="/remoting/polytomouskey.service">httpPolytomousKeyService</prop>-->
99 <!-- <prop key="/remoting/reference.service">httpReferenceService</prop>-->
100 <!-- <prop key="/remoting/service.service">httpServiceService</prop>-->
101 <!-- <prop key="/remoting/taxonnode.service">httpTaxonNodeService</prop>-->
102 <!-- <prop key="/remoting/taxon.service">httpTaxonService</prop>-->
103 <!-- <prop key="/remoting/term.service">httpTermService</prop>-->
104 <!-- <prop key="/remoting/user.service">httpUserService</prop>-->
105 <!-- <prop key="/remoting/vocabulary.service">httpVocabularyService</prop>-->
106 <!-- <prop key="/remoting/authenticationManager.service">httpAuthenticationManager</prop>-->
112 <!-- <!-- needed for HTTPInvoker --> -->
113 <!-- <bean class="org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter" />-->
117 ======= HandlerInterceptors =======
120 <bean id="datasourceContextHandlerInterceptor"
121 class="eu.etaxonomy.cdm.remote.controller.interceptor.DatasourceContextHandlerInterceptor" /> -->
122 <bean id=
"localeContextHandlerInterceptor"
123 class=
"eu.etaxonomy.cdm.remote.controller.interceptor.LocaleContextHandlerInterceptor" />
126 ======= ViewControllers =======
128 <bean id=
"urlFilenameViewController" class=
"org.springframework.web.servlet.mvc.UrlFilenameViewController">
131 The welcome-file-list in the web.xml will is ignored since the
132 cdmserver servlet is mapped to the root path [/] So the welcome file
133 list is being replaced by a SimpleUrlHandlerMapping on the root path
134 [/] which is mapped via this ViewController to the [index] view
136 <bean id=
"welcomeFileViewController"
137 class=
"org.springframework.web.servlet.mvc.UrlFilenameViewController">
138 <property name=
"suffix">
145 ======= ViewResolver =======
148 <bean id=
"viewResolverJsp"
149 class=
"org.springframework.web.servlet.view.InternalResourceViewResolver">
150 <property name=
"order" value=
"0" />
151 <property name=
"prefix" value=
"/WEB-INF/jsp/" />
152 <property name=
"suffix" value=
".jsp" />
153 <property name=
"viewNames">
155 view names (or name patterns) that can be handled
163 <bean id=
"oaiViewResolver" class=
"org.springframework.web.servlet.view.XmlViewResolver">
164 <property name=
"order" value=
"1"/>
165 <property name=
"location" value=
"/WEB-INF/oai-views.xml"/>
166 <!-- FOR DEBUGING ONLY !!!!
167 <property name="cache" value="false"/>
171 <bean id=
"contentNegotiatingViewResolver" class=
"org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
172 <property name=
"order" value=
"2" />
173 <property name=
"mediaTypes">
175 <entry key=
"xml" value=
"application/xml" />
176 <entry key=
"dc" value=
"application/xml" />
177 <entry key=
"rdf" value=
"application/xml" />
178 <entry key=
"rdfxml" value=
"application/rdf+xml" />
179 <entry key=
"json" value=
"application/json" />
182 <property name=
"viewResolvers">
184 <bean id=
"xmlTypeViewResolver" class=
"eu.etaxonomy.cdm.remote.view.PatternViewResolver">
185 <property name=
"location" value=
"/WEB-INF/xml-views.xml"/>
187 turn caching off FOR DEBUGING ONLY !!!!
188 <property name="cache" value="false"/>
191 <bean id=
"jsonTypeViewResolver" class=
"eu.etaxonomy.cdm.remote.view.PatternViewResolver">
192 <property name=
"location" value=
"/WEB-INF/json-views.xml"/>
194 turn caching off FOR DEBUGING ONLY !!!!
195 <property name="cache" value="false"/>
198 <bean id=
"rdfTypeViewResolver" class=
"eu.etaxonomy.cdm.remote.view.PatternViewResolver">
199 <property name=
"location" value=
"/WEB-INF/rdf-views.xml"/>
201 turn caching off FOR DEBUGING ONLY !!!!
202 <property name="cache" value="false"/>
210 ======= Exception Handling =======
212 <bean id=
"exceptionResolver" class=
"eu.etaxonomy.cdm.remote.exception.CdmExceptionResolver">
216 ======= Security =======
218 <!-- <bean id="basicProcessingFilter" class="org.springframework.security.ui.basicauth.BasicProcessingFilter">-->
219 <!-- <property name="authenticationManager"><ref bean="authenticationManager"/></property>-->
220 <!-- <property name="authenticationEntryPoint"><ref bean="authenticationEntryPoint"/></property>-->
222 <!-- <bean id="authenticationEntryPoint" class="org.springframework.security.ui.basicauth.BasicProcessingFilterEntryPoint">-->
223 <!-- <property name="realmName"><value>Name Of Your Realm</value></property>-->