106 lines
5.0 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<!--suppress SpringModelInspection -->
<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"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
2020-11-07 11:56:38 -08:00
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
2020-11-07 11:56:38 -08:00
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/mvc
2020-11-07 11:56:38 -08:00
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<context:component-scan base-package="com.wisemapping.rest"/>
<context:annotation-config/>
2013-02-10 15:24:37 -03:00
<!-- Interceptors Registration -->
<mvc:interceptors>
<bean id="webContentInterceptor" class="org.springframework.web.servlet.mvc.WebContentInterceptor">
<property name="cacheSeconds" value="0"/>
<property name="useExpiresHeader" value="true"/>
<property name="useCacheControlHeader" value="true"/>
<property name="useCacheControlNoStore" value="true"/>
</bean>
</mvc:interceptors>
2012-09-10 23:51:53 -03:00
<mvc:annotation-driven>
<mvc:message-converters>
<bean class="com.wisemapping.rest.DebugMappingJacksonHttpMessageConverter"/>
<bean class="org.springframework.http.converter.xml.Jaxb2RootElementHttpMessageConverter"/>
</mvc:message-converters>
</mvc:annotation-driven>
<bean id="jaxbMarshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
<property name="classesToBeBound">
<list>
<value>com.wisemapping.rest.model.RestMindmap</value>
2012-03-15 01:21:46 -03:00
<value>com.wisemapping.rest.model.RestMindmapInfo</value>
2012-02-20 14:42:07 -03:00
<value>com.wisemapping.rest.model.RestMindmapList</value>
<value>com.wisemapping.rest.model.RestUser</value>
<value>com.wisemapping.rest.model.RestErrors</value>
2012-06-09 15:49:19 -03:00
<value>com.wisemapping.rest.model.RestCollaboration</value>
<value>com.wisemapping.rest.model.RestCollaborationList</value>
<value>com.wisemapping.rest.model.RestLogItem</value>
<value>com.wisemapping.rest.model.RestLockInfo</value>
<value>com.wisemapping.rest.model.RestLabel</value>
2014-02-09 13:57:00 -03:00
<value>com.wisemapping.rest.model.RestLabelList</value>
<value>com.wisemapping.rest.model.RestUserRegistration</value>
</list>
</property>
</bean>
2020-11-06 21:35:54 -08:00
<bean id="contentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean">
<property name="favorParameter" value="true"/>
<property name="parameterName" value="mediaType"/>
<property name="defaultContentType" value="application/json" />
<property name="useJaf" value="false" />
<property name="mediaTypes">
<map>
2012-02-20 14:42:07 -03:00
<entry key="xml" value="application/xml"/>
2012-02-12 21:57:11 -03:00
<entry key="json" value="application/json"/>
<entry key="freemind" value="application/freemind"/>
<entry key="pdf" value="application/pdf"/>
<entry key="png" value="image/png"/>
2012-06-03 18:12:56 -03:00
<entry key="jpg" value="image/jpeg"/>
<entry key="svg" value="image/svg+xml"/>
<entry key="wxml" value="application/wisemapping+xml"/>
<entry key="txt" value="text/plain"/>
<entry key="xls" value="application/vnd.ms-excel"/>
<entry key="otd" value="application/vnd.oasis.opendocument.text"/>
2013-03-29 11:49:59 -03:00
<entry key="mmap" value="application/vnd.mindjet.mindmanager"/>
</map>
</property>
2020-11-06 21:35:54 -08:00
</bean>
<bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
<property name="contentNegotiationManager" ref="contentNegotiationManager"/>
2014-01-25 03:13:51 -03:00
<property name="viewResolvers">
<list>
<bean class="org.springframework.web.servlet.view.BeanNameViewResolver"/>
</list>
</property>
<property name="defaultViews">
2012-02-12 21:57:11 -03:00
<list>
2020-11-06 21:35:54 -08:00
<bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView">
2012-03-12 10:48:54 -03:00
<property name="extractValueFromSingleKeyModel" value="true"/>
</bean>
<bean class="org.springframework.web.servlet.view.xml.MarshallingView">
<constructor-arg ref="jaxbMarshaller"/>
</bean>
2012-02-12 21:57:11 -03:00
</list>
</property>
</bean>
2022-01-03 16:49:28 -08:00
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
<property name="basenames">
<list>
<value>messages</value>
</list>
</property>
</bean>
<!-- Configuration Bean -->
<context:property-placeholder location="/WEB-INF/app.properties" ignore-unresolvable="true"/>
</beans>