Commit 94227186 by inrgihc

修正文档内容

parent 37b6d952
......@@ -85,8 +85,8 @@
- (2) 接口详情功能
> 支持接口的详细定义、数据来源、访问分析等功能
- (3) 支持接口的长效Token功能
> 支持配置接口的长期Token功能
- (3) 支持接口的异常告警
> 对接已有的告警系统,来支持接口的异常告警
- (4) 前端界面整体美化
> 美化界面的交互展示,尤其是“拓扑结构”页面。
......@@ -137,7 +137,7 @@ sh ./docker-maven-build.sh
(2) 基于docker-compose提供linux联网环境下的一键安装,x86的CentOS系统下安装命令如下:
```
curl -k -sSL https://gitee.com/inrgihc/dbswitch/attach_files/1978630/download -o /tmp/sr.sh && bash /tmp/sr.sh && rm -f /tmp/sr.sh
curl -k -sSL https://gitee.com/inrgihc/sqlrest/attach_files/2210760/download -o /tmp/sr.sh && systemctl stop firewalld && bash /tmp/sr.sh && rm -f /tmp/sr.sh
```
文档详见: [build-docker/install/README.md](build-docker/install)
......
......@@ -15,6 +15,7 @@ import com.gitee.sqlrest.persistence.dao.ApiAssignmentDao;
import com.gitee.sqlrest.persistence.entity.AccessRecordEntity;
import com.gitee.sqlrest.persistence.entity.ApiAssignmentEntity;
import com.gitee.sqlrest.persistence.mapper.AccessRecordMapper;
import com.google.common.base.Charsets;
import java.io.IOException;
import java.util.concurrent.CompletableFuture;
import javax.annotation.Resource;
......@@ -28,6 +29,7 @@ import javax.servlet.http.HttpServletResponse;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
@Slf4j
......@@ -48,6 +50,8 @@ public class AuthenticationFilter implements Filter {
throws IOException, ServletException {
HttpServletRequest request = (HttpServletRequest) req;
HttpServletResponse response = (HttpServletResponse) resp;
response.setContentType(MediaType.APPLICATION_JSON_VALUE);
response.setCharacterEncoding(Charsets.UTF_8.name());
String path = request.getRequestURI().substring(Constants.API_PATH_PREFIX.length() + 2);
HttpMethodEnum method = HttpMethodEnum.exists(request.getMethod())
? HttpMethodEnum.valueOf(request.getMethod().toUpperCase())
......
......@@ -29,8 +29,6 @@ public class ApiServletService {
public void process(HttpMethodEnum method, HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType(MediaType.APPLICATION_JSON_VALUE);
response.setCharacterEncoding(Charsets.UTF_8.name());
String path = request.getRequestURI().substring(Constants.API_PATH_PREFIX.length() + 2);
ResultEntity result = ResultEntity.success();
ApiAssignmentEntity apiConfigEntity = apiAssignmentDao.getByUk(method, path);
......
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