2012-02-12 06:55:42 +01:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
|
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
|
|
xmlns:context="http://www.springframework.org/schema/context"
|
2012-02-16 05:16:51 +01:00
|
|
|
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
2012-02-12 06:55:42 +01:00
|
|
|
xsi:schemaLocation="
|
|
|
|
http://www.springframework.org/schema/beans
|
|
|
|
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
|
2012-02-16 05:16:51 +01:00
|
|
|
http://www.springframework.org/schema/context
|
|
|
|
http://www.springframework.org/schema/context/spring-context-3.1.xsd
|
|
|
|
http://www.springframework.org/schema/mvc
|
|
|
|
http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd">
|
|
|
|
|
|
|
|
<context:component-scan base-package="com.wisemapping.rest"/>
|
|
|
|
<context:annotation-config/>
|
|
|
|
<mvc:annotation-driven/>
|
2012-02-12 06:55:42 +01:00
|
|
|
|
|
|
|
|
|
|
|
<!-- To enable @RequestMapping process on type level and method level -->
|
2012-02-16 05:16:51 +01:00
|
|
|
<!--<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/>-->
|
|
|
|
<!--<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"/>-->
|
2012-02-12 06:55:42 +01:00
|
|
|
|
2012-02-16 05:16:51 +01:00
|
|
|
<bean id="jaxbMarshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
|
|
|
|
<property name="classesToBeBound">
|
|
|
|
<list>
|
|
|
|
<value>com.wisemapping.rest.model.RestMindMap</value>
|
|
|
|
</list>
|
|
|
|
</property>
|
|
|
|
</bean>
|
|
|
|
|
|
|
|
<bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
|
|
|
|
<property name="defaultContentType" value="application/json"/>
|
|
|
|
<property name="favorPathExtension" value="true"/>
|
2012-02-12 06:55:42 +01:00
|
|
|
<property name="mediaTypes">
|
|
|
|
<map>
|
|
|
|
<entry key="xml" value="application/xml"/>
|
|
|
|
<entry key="html" value="text/html"/>
|
2012-02-13 01:57:11 +01:00
|
|
|
<entry key="json" value="application/json"/>
|
2012-02-16 05:16:51 +01:00
|
|
|
<entry key="pdf" value="application/pdf"/>
|
|
|
|
<entry key="png" value="application/pdf"/>
|
2012-02-12 06:55:42 +01:00
|
|
|
</map>
|
|
|
|
</property>
|
|
|
|
<property name="viewResolvers">
|
|
|
|
<list>
|
2012-02-16 05:16:51 +01:00
|
|
|
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
2012-02-12 06:55:42 +01:00
|
|
|
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
|
2012-02-13 01:57:11 +01:00
|
|
|
<property name="prefix" value="/WEB-INF/jsp-rest/"/>
|
2012-02-12 06:55:42 +01:00
|
|
|
<property name="suffix" value=".jsp"/>
|
|
|
|
</bean>
|
|
|
|
</list>
|
|
|
|
</property>
|
2012-02-16 05:16:51 +01:00
|
|
|
<property name="defaultViews">
|
2012-02-13 01:57:11 +01:00
|
|
|
<list>
|
2012-02-16 05:16:51 +01:00
|
|
|
<bean class="org.springframework.web.servlet.view.json.MappingJacksonJsonView"/>
|
|
|
|
<bean class="org.springframework.web.servlet.view.xml.MarshallingView">
|
|
|
|
<constructor-arg ref="jaxbMarshaller"/>
|
|
|
|
</bean>
|
2012-02-13 01:57:11 +01:00
|
|
|
</list>
|
|
|
|
</property>
|
|
|
|
</bean>
|
|
|
|
|
2012-02-12 06:55:42 +01:00
|
|
|
</beans>
|