Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-gateway
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-gateway
Commits
6a9b1a35
提交
6a9b1a35
authored
10月 11, 2024
作者:
李秋林
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
gateway服务添加request、response日志
上级
75d009c3
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
73 行增加
和
23 行删除
+73
-23
pom.xml
pom.xml
+6
-0
ConfigController.java
...ain/java/com/sfa/gateway/controller/ConfigController.java
+0
-22
AuthFilter.java
src/main/java/com/sfa/gateway/filter/AuthFilter.java
+2
-1
GatewayLogFilter.java
src/main/java/com/sfa/gateway/filter/GatewayLogFilter.java
+0
-0
GatewayLog.java
src/main/java/com/sfa/gateway/pojo/GatewayLog.java
+65
-0
没有找到文件。
pom.xml
浏览文件 @
6a9b1a35
...
...
@@ -91,6 +91,12 @@
<artifactId>
mysql-connector-java
</artifactId>
</dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<optional>
true
</optional>
</dependency>
</dependencies>
<build>
...
...
src/main/java/com/sfa/gateway/controller/ConfigController.java
deleted
100644 → 0
浏览文件 @
75d009c3
package
com
.
sfa
.
gateway
.
controller
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.cloud.context.config.annotation.RefreshScope
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
@RequestMapping
(
"/config"
)
@RefreshScope
public
class
ConfigController
{
@Value
(
"${spring.redis.database}"
)
private
String
useLocalCache
;
@GetMapping
(
"/get"
)
public
String
get
()
{
return
useLocalCache
;
}
}
\ No newline at end of file
src/main/java/com/sfa/gateway/filter/AuthFilter.java
浏览文件 @
6a9b1a35
...
...
@@ -130,6 +130,6 @@ public class AuthFilter implements GlobalFilter, Ordered
@Override
public
int
getOrder
()
{
return
-
200
;
return
-
1
;
}
}
\ No newline at end of file
src/main/java/com/sfa/gateway/filter/GatewayLogFilter.java
0 → 100644
浏览文件 @
6a9b1a35
差异被折叠。
点击展开。
src/main/java/com/sfa/gateway/pojo/GatewayLog.java
0 → 100644
浏览文件 @
6a9b1a35
package
com
.
sfa
.
gateway
.
pojo
;
import
lombok.*
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
GatewayLog
{
/**请求来源**/
private
String
origin
;
/**访问实例*/
private
String
targetServer
;
/**请求路径*/
private
String
requestPath
;
/**请求方法*/
private
String
requestMethod
;
/**协议 */
private
String
schema
;
/**请求类型 */
private
String
requestContentType
;
/**请求头 */
private
String
headers
;
/**请求体*/
private
String
requestBody
;
/**响应体*/
private
String
responseData
;
/**请求ip*/
private
String
ip
;
/**IP所属城市*/
private
String
city
;
/**开始时间*/
private
Long
startTime
;
/**结束时间*/
private
Long
endTime
;
/**请求时间*/
private
String
requestTime
;
/**响应时间*/
private
String
responseTime
;
/**执行时间*/
private
long
executeTime
;
/**路由配置*/
private
String
routeConfig
;
/**响应状态*/
private
String
status
;
}
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论