Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sqlrest
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
comm
sqlrest
Commits
94227186
Commit
94227186
authored
May 30, 2025
by
inrgihc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修正文档内容
parent
37b6d952
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
README.md
+3
-3
sqlrest-core/src/main/java/com/gitee/sqlrest/core/filter/AuthenticationFilter.java
+4
-0
sqlrest-core/src/main/java/com/gitee/sqlrest/core/servlet/ApiServletService.java
+0
-2
No files found.
README.md
View file @
94227186
...
@@ -85,8 +85,8 @@
...
@@ -85,8 +85,8 @@
-
(2) 接口详情功能
-
(2) 接口详情功能
> 支持接口的详细定义、数据来源、访问分析等功能
> 支持接口的详细定义、数据来源、访问分析等功能
-
(3) 支持接口的
长效Token功能
-
(3) 支持接口的
异常告警
>
支持配置接口的长期Token功能
。
>
对接已有的告警系统,来支持接口的异常告警
。
-
(4) 前端界面整体美化
-
(4) 前端界面整体美化
> 美化界面的交互展示,尤其是“拓扑结构”页面。
> 美化界面的交互展示,尤其是“拓扑结构”页面。
...
@@ -137,7 +137,7 @@ sh ./docker-maven-build.sh
...
@@ -137,7 +137,7 @@ sh ./docker-maven-build.sh
(2) 基于docker-compose提供linux联网环境下的一键安装,x86的CentOS系统下安装命令如下:
(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
)
文档详见:
[
build-docker/install/README.md
](
build-docker/install
)
...
...
sqlrest-core/src/main/java/com/gitee/sqlrest/core/filter/AuthenticationFilter.java
View file @
94227186
...
@@ -15,6 +15,7 @@ import com.gitee.sqlrest.persistence.dao.ApiAssignmentDao;
...
@@ -15,6 +15,7 @@ import com.gitee.sqlrest.persistence.dao.ApiAssignmentDao;
import
com.gitee.sqlrest.persistence.entity.AccessRecordEntity
;
import
com.gitee.sqlrest.persistence.entity.AccessRecordEntity
;
import
com.gitee.sqlrest.persistence.entity.ApiAssignmentEntity
;
import
com.gitee.sqlrest.persistence.entity.ApiAssignmentEntity
;
import
com.gitee.sqlrest.persistence.mapper.AccessRecordMapper
;
import
com.gitee.sqlrest.persistence.mapper.AccessRecordMapper
;
import
com.google.common.base.Charsets
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.CompletableFuture
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
@@ -28,6 +29,7 @@ import javax.servlet.http.HttpServletResponse;
...
@@ -28,6 +29,7 @@ import javax.servlet.http.HttpServletResponse;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.MediaType
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
@Slf4j
@Slf4j
...
@@ -48,6 +50,8 @@ public class AuthenticationFilter implements Filter {
...
@@ -48,6 +50,8 @@ public class AuthenticationFilter implements Filter {
throws
IOException
,
ServletException
{
throws
IOException
,
ServletException
{
HttpServletRequest
request
=
(
HttpServletRequest
)
req
;
HttpServletRequest
request
=
(
HttpServletRequest
)
req
;
HttpServletResponse
response
=
(
HttpServletResponse
)
resp
;
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
);
String
path
=
request
.
getRequestURI
().
substring
(
Constants
.
API_PATH_PREFIX
.
length
()
+
2
);
HttpMethodEnum
method
=
HttpMethodEnum
.
exists
(
request
.
getMethod
())
HttpMethodEnum
method
=
HttpMethodEnum
.
exists
(
request
.
getMethod
())
?
HttpMethodEnum
.
valueOf
(
request
.
getMethod
().
toUpperCase
())
?
HttpMethodEnum
.
valueOf
(
request
.
getMethod
().
toUpperCase
())
...
...
sqlrest-core/src/main/java/com/gitee/sqlrest/core/servlet/ApiServletService.java
View file @
94227186
...
@@ -29,8 +29,6 @@ public class ApiServletService {
...
@@ -29,8 +29,6 @@ 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
.
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
);
ResultEntity
result
=
ResultEntity
.
success
();
ResultEntity
result
=
ResultEntity
.
success
();
ApiAssignmentEntity
apiConfigEntity
=
apiAssignmentDao
.
getByUk
(
method
,
path
);
ApiAssignmentEntity
apiConfigEntity
=
apiAssignmentDao
.
getByUk
(
method
,
path
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment