Не знаю что
This commit is contained in:
@ -99,15 +99,15 @@ public class DBMSRecords implements ServletContextAware {
|
||||
|
||||
public String sendError(int code, String message) {
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("errorCode",code);
|
||||
json.put("errorMessage",message);
|
||||
json.put("error_code",code);
|
||||
json.put("error_message",message);
|
||||
return json.toString();
|
||||
}
|
||||
|
||||
//Документация по @RequestBody http://javastudy.ru/spring-mvc/json-xml/ application/xml
|
||||
@RequestMapping(value = "/records.php",method = {RequestMethod.POST,RequestMethod.GET},produces = "text/plain; charset=utf-8")
|
||||
@RequestMapping(value = "/monitoring/records.php",method = {RequestMethod.POST,RequestMethod.GET},produces = "text/plain; charset=utf-8")
|
||||
@ResponseBody
|
||||
public Object ajaxTamer(@ModelAttribute User user,@RequestBody byte[] reqData,@RequestParam(required=false,name="lng") String language_id) {
|
||||
public Object ajaxTamer(@ModelAttribute User user,@RequestBody(required = false) byte[] reqData,@RequestParam(required=false,name="lng") String language_id) {
|
||||
|
||||
if(language_id!=null && !language_id.equals(""))
|
||||
user.language_id=language_id;
|
||||
@ -115,6 +115,9 @@ public class DBMSRecords implements ServletContextAware {
|
||||
|
||||
boolean error=false;
|
||||
String result=sendError(1,"Request not processed!");
|
||||
if(reqData==null)
|
||||
return result;
|
||||
|
||||
//response.setCharacterEncoding("UTF-8");
|
||||
|
||||
//response.getWriter().append("Served at: ").append(request.getContextPath());
|
||||
|
||||
Reference in New Issue
Block a user