|
@@ -10,6 +10,7 @@ import cn.com.qmth.examcloud.web.jpa.DataIntegrityViolationTransverter;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.dao.DataIntegrityViolationException;
|
|
|
+import org.springframework.http.HttpHeaders;
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
import org.springframework.http.converter.HttpMessageNotReadableException;
|
|
@@ -245,8 +246,9 @@ public class CustomExceptionHandler {
|
|
|
LOG.debug(err.getMessage(), err);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- return new ResponseEntity<>(body, httpStatus);
|
|
|
+ HttpHeaders headers = new HttpHeaders();
|
|
|
+ headers.add("Content-Type","application/json;charset=utf-8");
|
|
|
+ return new ResponseEntity<>(body, headers,httpStatus);
|
|
|
}
|
|
|
|
|
|
/**
|