diff --git a/.gitea/workflows/mvn-deploy.yaml b/.gitea/workflows/mvn-deploy.yaml
new file mode 100644
index 0000000..010d419
--- /dev/null
+++ b/.gitea/workflows/mvn-deploy.yaml
@@ -0,0 +1,25 @@
+## 工作流触发时机
+on:
+ push:
+ tags:
+ - '*'
+
+jobs:
+
+ ## 任务名称
+ local-deploy:
+
+ ## 任务执行的服务器
+ runs-on: tiesheng-local
+
+ ## 任务步骤
+ steps:
+
+ ## 检出代码(固定配置)
+ - name: Check out repository code
+ uses: https://git.tieshengkeji.com/actions/checkout@v4
+
+ ## maven打包
+ - name: Maven deploy
+ run: |
+ mvn deploy
diff --git a/pom.xml b/pom.xml
index 97d9a6d..c1b9592 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
com.tiesheng.springboot-parent
springboot-parent
- 2.0.11
+ 2.0.12
pom
springboot-parent
杭州铁晟科技有限公司基础依赖
@@ -58,49 +58,49 @@
com.tiesheng.springboot-parent
springboot-database
- 2.0.11
+ 2.0.12
com.tiesheng.springboot-parent
springboot-login
- 2.0.11
+ 2.0.12
com.tiesheng.springboot-parent
springboot-web
- 2.0.11
+ 2.0.12
com.tiesheng.springboot-parent
springboot-util
- 2.0.11
+ 2.0.12
com.tiesheng.springboot-parent
springboot-platform
- 2.0.11
+ 2.0.12
com.tiesheng.springboot-parent
springboot-message
- 2.0.11
+ 2.0.12
com.tiesheng.springboot-parent
springboot-role
- 2.0.11
+ 2.0.12
com.tiesheng.springboot-parent
springboot-annotation
- 2.0.11
+ 2.0.12
@@ -125,6 +125,13 @@
+
+
+ gitea
+ https://git.tieshengkeji.com/api/packages/tieshengkeji/maven
+
+
+
diff --git a/springboot-ademo/pom.xml b/springboot-ademo/pom.xml
index 8bdcae0..9be0191 100644
--- a/springboot-ademo/pom.xml
+++ b/springboot-ademo/pom.xml
@@ -6,11 +6,11 @@
com.tiesheng.springboot-parent
springboot-parent
- 2.0.11
+ 2.0.12
springboot-ademo
- 2.0.11
+ 2.0.12
8
diff --git a/springboot-annotation/pom.xml b/springboot-annotation/pom.xml
index 029737a..e9a66f6 100644
--- a/springboot-annotation/pom.xml
+++ b/springboot-annotation/pom.xml
@@ -6,7 +6,7 @@
com.tiesheng.springboot-parent
springboot-parent
- 2.0.11
+ 2.0.12
springboot-annotation
diff --git a/springboot-database/pom.xml b/springboot-database/pom.xml
index b859cb7..f60efa4 100644
--- a/springboot-database/pom.xml
+++ b/springboot-database/pom.xml
@@ -6,7 +6,7 @@
com.tiesheng.springboot-parent
springboot-parent
- 2.0.11
+ 2.0.12
springboot-database
diff --git a/springboot-login/pom.xml b/springboot-login/pom.xml
index 4252c15..b56d672 100644
--- a/springboot-login/pom.xml
+++ b/springboot-login/pom.xml
@@ -6,7 +6,7 @@
com.tiesheng.springboot-parent
springboot-parent
- 2.0.11
+ 2.0.12
springboot-login
diff --git a/springboot-message/pom.xml b/springboot-message/pom.xml
index 4c52b0b..6fab64e 100644
--- a/springboot-message/pom.xml
+++ b/springboot-message/pom.xml
@@ -6,7 +6,7 @@
com.tiesheng.springboot-parent
springboot-parent
- 2.0.11
+ 2.0.12
springboot-message
diff --git a/springboot-platform/pom.xml b/springboot-platform/pom.xml
index 97f0366..804f740 100644
--- a/springboot-platform/pom.xml
+++ b/springboot-platform/pom.xml
@@ -6,7 +6,7 @@
com.tiesheng.springboot-parent
springboot-parent
- 2.0.11
+ 2.0.12
springboot-platform
diff --git a/springboot-role/pom.xml b/springboot-role/pom.xml
index affbd59..cd2f1ca 100644
--- a/springboot-role/pom.xml
+++ b/springboot-role/pom.xml
@@ -6,7 +6,7 @@
com.tiesheng.springboot-parent
springboot-parent
- 2.0.11
+ 2.0.12
springboot-role
diff --git a/springboot-util/pom.xml b/springboot-util/pom.xml
index 92aa89f..6898ca9 100644
--- a/springboot-util/pom.xml
+++ b/springboot-util/pom.xml
@@ -6,7 +6,7 @@
com.tiesheng.springboot-parent
springboot-parent
- 2.0.11
+ 2.0.12
springboot-util
diff --git a/springboot-web/pom.xml b/springboot-web/pom.xml
index 1138aa2..a0922eb 100644
--- a/springboot-web/pom.xml
+++ b/springboot-web/pom.xml
@@ -6,7 +6,7 @@
com.tiesheng.springboot-parent
springboot-parent
- 2.0.11
+ 2.0.12
springboot-web
diff --git a/springboot-web/src/main/java/com/tiesheng/web/service/OkHttpLogInterceptor.java b/springboot-web/src/main/java/com/tiesheng/web/service/OkHttpLogInterceptor.java
index 06df127..eae45e7 100644
--- a/springboot-web/src/main/java/com/tiesheng/web/service/OkHttpLogInterceptor.java
+++ b/springboot-web/src/main/java/com/tiesheng/web/service/OkHttpLogInterceptor.java
@@ -2,8 +2,8 @@ package com.tiesheng.web.service;
import cn.hutool.core.thread.ThreadUtil;
import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
-import com.tiesheng.util.service.http.OkHttpUtil;
import com.tiesheng.web.mapper.CoreLogApiMapper;
import com.tiesheng.web.pojos.dao.CoreLogApi;
import okhttp3.*;
@@ -30,7 +30,7 @@ public class OkHttpLogInterceptor implements Interceptor {
logApi.setUrl(request.url().toString());
logApi.setContent(requestBody2String(request));
- Response response;
+ Response response = null;
try {
response = chain.proceed(request);
logApi.setResult(response.code());
@@ -46,20 +46,11 @@ public class OkHttpLogInterceptor implements Interceptor {
}
}
} catch (Exception e) {
-
JSONObject object = new JSONObject();
object.put("code", -1);
- object.put("message", e.getMessage());
+ object.put("message", JSON.toJSONString(e));
object.put("exception", e);
logApi.setRespBody(object.toJSONString());
-
- response = new Response.Builder()
- .request(request)
- .protocol(Protocol.HTTP_1_1)
- .code(logApi.getResult())
- .message(e.getMessage())
- .body(OkHttpUtil.ofJsonResponse(logApi.getRespBody()))
- .build();
}
ThreadUtil.execute(() -> coreLogApiMapper.insert(logApi));