关键问题
1)The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.
2)Required String parameter 'zoneName' is not present
3)Required String parameter 'zoneId' is not present
4)The request sent by the client was syntactically incorrect
关键点
前台:
1.///////////////////////////////////////////////////////////////////////////////////////////////////
JSON.stringify(data)
2.///////////////////////////////////////////////////////////////////////////////////////////////////
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
后台:
3.///////////////////////////////////////////////////////////////////////////////////////////////////
produces = "application/json"
///////////////////////////////////////////////////////////////////////////////////////////////////
4.///////////////////////////////////////////////////////////////////////////////////////////////////
@RequestBody
final ZoneInfo zoneInfo,
5.///////////////////////////////////////////////////////////////////////////////////////////////////
@RequestParam String zoneId,
///////////////////////////////////////////////////////////////////////////////////////////////////
最后注意:
过滤器 (!isAuth(url) || url.contains(".json")) 放开。