Commit 1280bde0 by inrgihc

修正issue:IATX4D

parent 0e60c2a2
...@@ -8,6 +8,7 @@ import com.gitee.sqlrest.common.exception.ResponseErrorCode; ...@@ -8,6 +8,7 @@ import com.gitee.sqlrest.common.exception.ResponseErrorCode;
import com.gitee.sqlrest.core.exec.ApiExecuteService; import com.gitee.sqlrest.core.exec.ApiExecuteService;
import com.gitee.sqlrest.persistence.dao.ApiAssignmentDao; import com.gitee.sqlrest.persistence.dao.ApiAssignmentDao;
import com.gitee.sqlrest.persistence.entity.ApiAssignmentEntity; import com.gitee.sqlrest.persistence.entity.ApiAssignmentEntity;
import com.google.common.base.Charsets;
import java.io.IOException; import java.io.IOException;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.ServletException; import javax.servlet.ServletException;
...@@ -29,6 +30,7 @@ public class ApiServletService { ...@@ -29,6 +30,7 @@ public class ApiServletService {
public void process(HttpMethodEnum method, HttpServletRequest request, HttpServletResponse response) public void process(HttpMethodEnum method, HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException { throws ServletException, IOException {
response.setContentType(MediaType.APPLICATION_JSON_VALUE); response.setContentType(MediaType.APPLICATION_JSON_VALUE);
response.setCharacterEncoding(Charsets.UTF_8.name());
String path = request.getRequestURI().substring(Constants.API_PATH_PREFIX.length() + 2); String path = request.getRequestURI().substring(Constants.API_PATH_PREFIX.length() + 2);
ApiAssignmentEntity apiConfigEntity = apiAssignmentDao.getByUk(method, path); ApiAssignmentEntity apiConfigEntity = apiAssignmentDao.getByUk(method, path);
if (null == apiConfigEntity || !apiConfigEntity.getStatus()) { if (null == apiConfigEntity || !apiConfigEntity.getStatus()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment