HTTP Status 415 - Unsupported Media Type

用SpringMVC作数据绑定时,提示“HTTP Status 415 - Unsupported Media Type”错误,获取不到绑定的Json数据

查找资料【http://www.ibm.com/developerworks/cn/web/wa-restful/】发现缺少配置:


	
   		
	
	
	
       
             
                 
                 
                 
             
        
	
	

添加Jackson相关JAR包

jackson-core-asl-1.9.13.jar

jackson-mapper-asl-1.9.13.jar

提示如下错误:

java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/Jjackson-mapper-asl-1.9.13.jaravaType

重新换jar包

jackson-core-2.6.0-20150112.220620-5.jar

jackson-databind-2.6.0-20150113.231101-16.jar

jackson-annotations-2.5.1-20150105.230841-2.jar

解决问题



你可能感兴趣的:(spring)