ajax傳參問題
若後臺用@RequestParam接收參數,contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
若後臺用@RequestBody接收參數,contentType: 'application/json;charset=UTF-8',
//如果前端傳入的是json數據那麼後端使用,通過map.get(“id”)獲取對應的數據
@RequestBody HashMap<String, String> map
//如果前端傳入的是正常表單數據,那麼後端使用
@RequestParam("id") String id
@RequestParam(value="id", required = false) String id