Skip to content

Commit

Permalink
Merge pull request #387 from jtraviss/master
Browse files Browse the repository at this point in the history
REST默认返回JSON格式
  • Loading branch information
calvin1978 committed Oct 7, 2014
2 parents 41c0e80 + d84df3b commit 7ed5da0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/showcase/src/main/webapp/WEB-INF/spring-mvc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@

<!-- REST中根据URL后缀自动判定Content-Type及相应的View -->
<bean id="contentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean">
<property name="ignoreAcceptHeader" value="true" />
<property name="defaultContentType" value="application/json" />
<property name="mediaTypes" >
<value>
json=application/json
Expand Down

0 comments on commit 7ed5da0

Please sign in to comment.