mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2025-03-15 01:31:41 +01:00
152 lines
6.8 KiB
XML
152 lines
6.8 KiB
XML
<?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
|
|
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
|
|
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/>
|
|
|
|
<!-- 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>
|
|
|
|
<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>
|
|
<value>com.wisemapping.rest.model.RestMindmapInfo</value>
|
|
<value>com.wisemapping.rest.model.RestMindmapList</value>
|
|
<value>com.wisemapping.rest.model.RestUser</value>
|
|
<value>com.wisemapping.rest.model.RestErrors</value>
|
|
<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>
|
|
</list>
|
|
</property>
|
|
</bean>
|
|
|
|
<bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
|
|
<property name="defaultContentType" value="application/json"/>
|
|
<property name="mediaTypes">
|
|
<map>
|
|
<entry key="xml" value="application/xml"/>
|
|
<entry key="json" value="application/json"/>
|
|
<entry key="freemind" value="application/freemind"/>
|
|
<entry key="pdf" value="application/pdf"/>
|
|
<entry key="png" value="image/png"/>
|
|
<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"/>
|
|
<entry key="mmap" value="application/vnd.mindjet.mindmanager"/>
|
|
</map>
|
|
</property>
|
|
<property name="viewResolvers">
|
|
<list>
|
|
<bean class="org.springframework.web.servlet.view.BeanNameViewResolver"/>
|
|
</list>
|
|
</property>
|
|
<property name="defaultViews">
|
|
<list>
|
|
<bean class="org.springframework.web.servlet.view.json.MappingJacksonJsonView">
|
|
<property name="extractValueFromSingleKeyModel" value="true"/>
|
|
</bean>
|
|
<bean class="org.springframework.web.servlet.view.xml.MarshallingView">
|
|
<constructor-arg ref="jaxbMarshaller"/>
|
|
</bean>
|
|
</list>
|
|
</property>
|
|
</bean>
|
|
|
|
<bean id="transformViewPdf" class="com.wisemapping.rest.view.TransformView">
|
|
<constructor-arg value="application/pdf"/>
|
|
<constructor-arg ref="notificationService"/>
|
|
</bean>
|
|
|
|
<bean id="transformViewPng" class="com.wisemapping.rest.view.TransformView">
|
|
<constructor-arg value="image/png"/>
|
|
<constructor-arg ref="notificationService"/>
|
|
</bean>
|
|
|
|
<bean id="transformViewJpeg" class="com.wisemapping.rest.view.TransformView">
|
|
<constructor-arg value="image/jpeg"/>
|
|
<constructor-arg ref="notificationService"/>
|
|
</bean>
|
|
|
|
<bean id="transformViewFreemind" class="com.wisemapping.rest.view.TransformView">
|
|
<constructor-arg value="application/freemind"/>
|
|
<constructor-arg ref="notificationService"/>
|
|
</bean>
|
|
|
|
<bean id="transformViewSvg" class="com.wisemapping.rest.view.TransformView">
|
|
<constructor-arg value="image/svg+xml"/>
|
|
<constructor-arg ref="notificationService"/>
|
|
</bean>
|
|
|
|
<bean id="transformViewXls" class="com.wisemapping.rest.view.TransformView">
|
|
<constructor-arg value="application/vnd.ms-excel"/>
|
|
<constructor-arg ref="notificationService"/>
|
|
</bean>
|
|
|
|
|
|
<bean id="transformViewOdt" class="com.wisemapping.rest.view.TransformView">
|
|
<constructor-arg value="application/vnd.oasis.opendocument.text"/>
|
|
<constructor-arg ref="notificationService"/>
|
|
</bean>
|
|
|
|
|
|
<bean id="transformViewTxt" class="com.wisemapping.rest.view.TransformView">
|
|
<constructor-arg value="text/plain"/>
|
|
<constructor-arg ref="notificationService"/>
|
|
</bean>
|
|
|
|
<bean id="transformViewMMap" class="com.wisemapping.rest.view.TransformView">
|
|
<constructor-arg value="application/vnd.mindjet.mindmanager"/>
|
|
<constructor-arg ref="notificationService"/>
|
|
</bean>
|
|
|
|
<bean id="transformViewWise" class="com.wisemapping.rest.view.TransformView">
|
|
<constructor-arg value="application/wisemapping+xml"/>
|
|
<constructor-arg ref="notificationService"/>
|
|
</bean>
|
|
|
|
<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"/>
|
|
<bean id="documentationConfig" class="com.mangofactory.swagger.configuration.DocumentationConfig"/>
|
|
<!-- Custom extensibility module (bean) Has override methods to customize the document generation-->
|
|
<!--<bean id="extensibilityModule" class="com.mangofactory.swagger.springmvc.example.config.ExampleExtensibilityModule" />-->
|
|
</beans> |