<?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:context="http://www.springframework.org/schema/context"
   xsi:schemaLocation="http://www.springframework.org/schema/beans 
      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
      http://www.springframework.org/schema/context 
      http://www.springframework.org/schema/context/spring-context-3.0.xsd">

	<context:component-scan base-package="com.platform.controller,com.platform.test;" >
	   <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>  
	   <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Service"/>  
	</context:component-scan>

	<!-- 用于将对象转换为JSON -->
	<bean id="stringConverter"
		class="org.springframework.http.converter.StringHttpMessageConverter">
		<property name="supportedMediaTypes">
			<list>
				<value>application/json;charset=UTF-8</value>
				<value>text/html;charset=UTF-8</value>			
			</list>
		</property>
	</bean>
	<bean id="jsonConverter"
	    class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"/>	    
	<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
	    <property name="messageConverters">
	        <list>
	           <ref bean="stringConverter" />
	           <ref bean="jsonConverter" />
	        </list>
	    </property>
	</bean>
	
</beans>