mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2025-03-14 17:21:41 +01:00
52 lines
2.3 KiB
XML
52 lines
2.3 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.xsd
|
|
http://www.springframework.org/schema/context
|
|
http://www.springframework.org/schema/context/spring-context.xsd
|
|
http://www.springframework.org/schema/mvc
|
|
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
|
|
|
|
<context:component-scan base-package="com.wisemapping.rest"/>
|
|
|
|
<mvc:annotation-driven>
|
|
<mvc:message-converters>
|
|
<bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"/>
|
|
<bean class="org.springframework.http.converter.xml.Jaxb2RootElementHttpMessageConverter"/>
|
|
</mvc:message-converters>
|
|
</mvc:annotation-driven>
|
|
|
|
<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="mediaTypes">
|
|
<map>
|
|
<entry key="xml" value="application/xml"/>
|
|
<entry key="json" value="application/json"/>
|
|
</map>
|
|
</property>
|
|
</bean>
|
|
|
|
<bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
|
|
<property name="contentNegotiationManager" ref="contentNegotiationManager"/>
|
|
<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.MappingJackson2JsonView">
|
|
<property name="extractValueFromSingleKeyModel" value="true"/>
|
|
</bean>
|
|
</list>
|
|
</property>
|
|
</bean>
|
|
</beans> |