crafter.core.rest-context.xml Maven / Gradle / Ivy
<?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: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/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd"> <mvc:annotation-driven/> <bean id="crafter.cacheRestController" class="org.craftercms.core.controller.rest.CacheRestController"> <property name="cacheTemplate" ref="crafter.cacheTemplate"/> <property name="storeService" ref="crafter.contentStoreService"/> </bean> <bean id="crafter.contentStoreRestController" class="org.craftercms.core.controller.rest.ContentStoreRestController"> <property name="storeService" ref="crafter.contentStoreService"/> </bean> <!-- Main REST view resolver --> <bean id="crafter.mainViewResolver" class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver"> <property name="defaultViews"> <list> <ref bean="crafter.jsonView"/> <ref bean="crafter.xmlView"/> </list> </property> </bean> <!-- JSON --> <bean id="crafter.coreObjectMapper" class="org.craftercms.commons.jackson.CustomSerializationObjectMapper"> <property name="serializers"> <list> <bean class="org.craftercms.core.util.json.jackson.Dom4jDocumentJsonSerializer"/> </list> </property> </bean> <bean id="crafter.jsonView" class="org.springframework.web.servlet.view.json.MappingJackson2JsonView"> <property name="objectMapper" ref="crafter.coreObjectMapper"/> <property name="disableCaching" value="${crafter.core.rest.views.json.disableCaching}"/> <property name="prefixJson" value="${crafter.core.rest.views.json.prefixJson}"/> <property name="extractValueFromSingleKeyModel" value="${crafter.core.rest.views.json.renderSingleAttributeAsRootObject}"/> </bean> <!-- XML --> <bean id="crafter.xmlMarshaller" class="org.craftercms.core.util.xml.marshalling.xstream.CrafterXStreamMarshaller"> <property name="unsupportedClasses" value="org.springframework.validation.BindingResult"/> </bean> <bean id="crafter.xmlView" class="org.springframework.web.servlet.view.xml.MarshallingView"> <constructor-arg ref="crafter.xmlMarshaller"/> </bean> </beans>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy