Project

General

Profile

1
<beans xmlns="http://www.springframework.org/schema/beans"
2
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
3
	xmlns:context="http://www.springframework.org/schema/context"
4
	xmlns:util="http://www.springframework.org/schema/util" xmlns:mvc="http://www.springframework.org/schema/mvc"
5
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
6
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
7
        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd  
8
        http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
9

    
10

    
11
	<bean id="funderTemplateViewResolver"
12
		class="eu.dnetlib.springutils.stringtemplate.StringTemplateViewResolver"
13
		p:cache="false" p:templateGroup-ref="funderTemplateGroup" p:contentType="text/html;charset=UTF-8" />
14

    
15
	<bean id="funderTemplateGroup"
16
		class="eu.dnetlib.springutils.stringtemplate.ClassPathStringTemplateGroup"
17
		p:refreshInterval="0" p:package="eu.dnetlib.openaire.exporter.funders.views">
18
		<constructor-arg type="java.lang.String" value="funders" />
19
	</bean>
20

    
21
	<!-- Select the views based on the Accept header or the path extension. 
22
		It is not working with the parameter ?format=xml, but I do not know why -->
23
	<bean id="contentNegotiationManager"
24
		class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean">
25
		<property name="defaultContentType" value="text/html" />
26
		<property name="favorParameter" value="true" />
27
		<property name="parameterName" value="format" />
28
		<property name="mediaTypes">
29
			<map>
30
				<entry key="xml" value="application/xml" />
31
				<entry key="html" value="text/html" />
32
			</map>
33
		</property>
34
	</bean>
35

    
36
	<mvc:annotation-driven
37
		content-negotiation-manager="contentNegotiationManager">
38
	</mvc:annotation-driven>
39

    
40
</beans>
(2-2/2)