← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11182: fallback to using application/json if no other content negotiation strategies are available

 

------------------------------------------------------------
revno: 11182
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-06-10 12:50:53 +0700
message:
  fallback to using application/json if no other content negotiation strategies are available
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/resources/META-INF/dhis/servlet.xml


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/META-INF/dhis/servlet.xml'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/META-INF/dhis/servlet.xml	2012-12-14 13:46:47 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/META-INF/dhis/servlet.xml	2013-06-10 05:50:53 +0000
@@ -19,6 +19,10 @@
 
   <context:component-scan base-package="org.hisp.dhis.api" />
 
+  <bean id="fixedContentNegotiationStrategy" class="org.springframework.web.accept.FixedContentNegotiationStrategy">
+    <constructor-arg name="defaultContentType" value="application/json" />
+  </bean>
+
   <bean id="headerContentNegotiationStrategy" class="org.springframework.web.accept.HeaderContentNegotiationStrategy" />
 
   <bean id="pathExtensionContentNegotiationStrategy" class="org.springframework.web.accept.PathExtensionContentNegotiationStrategy">
@@ -38,6 +42,7 @@
       <list>
         <ref bean="pathExtensionContentNegotiationStrategy" />
         <ref bean="headerContentNegotiationStrategy" />
+        <ref bean="fixedContentNegotiationStrategy" />
       </list>
     </constructor-arg>
   </bean>