2012-02-12 02:55:42 -03: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"
|
|
|
|
xsi:schemaLocation="
|
|
|
|
http://www.springframework.org/schema/beans
|
|
|
|
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
|
|
|
|
http://www.springframework.org/schema/context
|
|
|
|
http://www.springframework.org/schema/context/spring-context-3.1.xsd">
|
|
|
|
|
|
|
|
<context:component-scan base-package="dw.spring3.rest.controller"/>
|
|
|
|
|
|
|
|
<!-- To enable @RequestMapping process on type level and method level -->
|
|
|
|
<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/>
|
|
|
|
|
|
|
|
<bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
|
|
|
|
<property name="mediaTypes">
|
|
|
|
<map>
|
|
|
|
<entry key="xml" value="application/xml"/>
|
|
|
|
<entry key="html" value="text/html"/>
|
2012-02-12 21:57:11 -03:00
|
|
|
<entry key="json" value="application/json"/>
|
2012-02-12 02:55:42 -03:00
|
|
|
</map>
|
|
|
|
</property>
|
|
|
|
<property name="viewResolvers">
|
|
|
|
<list>
|
|
|
|
<bean class="org.springframework.web.servlet.view.BeanNameViewResolver"/>
|
|
|
|
|
|
|
|
<bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
|
|
|
|
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
|
2012-02-12 21:57:11 -03:00
|
|
|
<property name="prefix" value="/WEB-INF/jsp-rest/"/>
|
2012-02-12 02:55:42 -03:00
|
|
|
<property name="suffix" value=".jsp"/>
|
|
|
|
</bean>
|
|
|
|
</list>
|
|
|
|
</property>
|
|
|
|
</bean>
|
|
|
|
|
2012-02-12 21:57:11 -03:00
|
|
|
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
|
|
|
|
<property name="messageConverters">
|
|
|
|
<list>
|
|
|
|
<ref bean="jsonConverter"/>
|
|
|
|
<ref bean="marshallingConverter"/>
|
|
|
|
</list>
|
|
|
|
</property>
|
|
|
|
</bean>
|
|
|
|
|
|
|
|
<bean id="jsonConverter" class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter">
|
|
|
|
<property name="supportedMediaTypes" value="application/json"/>
|
|
|
|
</bean>
|
|
|
|
|
|
|
|
|
|
|
|
<bean id="marshallingConverter" class="org.springframework.http.converter.xml.MarshallingHttpMessageConverter">
|
|
|
|
<constructor-arg ref="jaxbMarshaller"/>
|
|
|
|
<property name="supportedMediaTypes" value="application/xml"/>
|
|
|
|
</bean>
|
|
|
|
|
|
|
|
<bean id="jaxbMarshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
|
|
|
|
<property name="classesToBeBound">
|
|
|
|
<list>
|
|
|
|
<value>java.util.HashMap</value>
|
|
|
|
</list>
|
|
|
|
</property>
|
|
|
|
</bean>
|
|
|
|
|
2012-02-12 02:55:42 -03:00
|
|
|
|
2012-02-12 21:57:11 -03:00
|
|
|
<bean id="mindmapRestController" class="com.wisemapping.rest.MindmapController">
|
|
|
|
<property name="mindmapService" ref="mindmapService"/>
|
2012-02-12 02:55:42 -03:00
|
|
|
</bean>
|
|
|
|
</beans>
|