阅读背景:

spring mvc控制器接受JSON对象,它具有可变数量的键/值。

来源:互联网 

I know the JSON object I need to accept will always be single keys and values. I attempted to write my Spring MVC controller with @RequestBody Map and @RequestBody Map however I always get 400 Bad Request. When I change my @RequestBody to a String I see my data come through and no Bad Request response is returned.Is it possible to write something to accept an arbitrary JSON object that will always conform to the contract of being a single key to a single value? I know the JSON object I need to accept will al




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: