From f52fe97063bbd4a8857af246ebbc5b5a15034e56 Mon Sep 17 00:00:00 2001
From: lorne <1991wangliang@gmail.com>
Date: Thu, 12 Jun 2025 22:11:06 +0800
Subject: [PATCH 1/3] fix back operator user bug
---
example/example-app/example-app-cmd-domain/pom.xml | 2 +-
example/example-app/example-app-cmd-meta/pom.xml | 2 +-
example/example-app/example-app-query/pom.xml | 2 +-
example/example-app/pom.xml | 2 +-
example/example-domain/example-domain-leave/pom.xml | 2 +-
example/example-domain/example-domain-user/pom.xml | 2 +-
example/example-domain/pom.xml | 2 +-
example/example-infra/example-infra-flow/pom.xml | 2 +-
example/example-infra/example-infra-jpa/pom.xml | 2 +-
example/example-infra/example-infra-security/pom.xml | 2 +-
example/example-infra/pom.xml | 2 +-
example/example-interface/pom.xml | 2 +-
example/example-server/pom.xml | 2 +-
example/pom.xml | 2 +-
pom.xml | 2 +-
springboot-starter-data-authorization/pom.xml | 2 +-
springboot-starter-data-fast/pom.xml | 2 +-
springboot-starter-flow/pom.xml | 2 +-
.../com/codingapi/springboot/flow/service/FlowNodeService.java | 2 +-
springboot-starter-security/pom.xml | 2 +-
springboot-starter/pom.xml | 2 +-
springboot-starter/src/main/resources/banner.txt | 2 +-
22 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/example/example-app/example-app-cmd-domain/pom.xml b/example/example-app/example-app-cmd-domain/pom.xml
index 3bec376a..694235b6 100644
--- a/example/example-app/example-app-cmd-domain/pom.xml
+++ b/example/example-app/example-app-cmd-domain/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
example-app
- 3.4.2
+ 3.4.3
../pom.xml
diff --git a/example/example-app/example-app-cmd-meta/pom.xml b/example/example-app/example-app-cmd-meta/pom.xml
index 4295d9ec..f72a35c1 100644
--- a/example/example-app/example-app-cmd-meta/pom.xml
+++ b/example/example-app/example-app-cmd-meta/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
example-app
- 3.4.2
+ 3.4.3
../pom.xml
diff --git a/example/example-app/example-app-query/pom.xml b/example/example-app/example-app-query/pom.xml
index 1a78b555..244a0a3a 100644
--- a/example/example-app/example-app-query/pom.xml
+++ b/example/example-app/example-app-query/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
example-app
- 3.4.2
+ 3.4.3
../pom.xml
diff --git a/example/example-app/pom.xml b/example/example-app/pom.xml
index a80852ce..498e1c33 100644
--- a/example/example-app/pom.xml
+++ b/example/example-app/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
springboot-example
- 3.4.2
+ 3.4.3
../pom.xml
pom
diff --git a/example/example-domain/example-domain-leave/pom.xml b/example/example-domain/example-domain-leave/pom.xml
index 217ea029..1b191e07 100644
--- a/example/example-domain/example-domain-leave/pom.xml
+++ b/example/example-domain/example-domain-leave/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
example-domain
- 3.4.2
+ 3.4.3
../pom.xml
diff --git a/example/example-domain/example-domain-user/pom.xml b/example/example-domain/example-domain-user/pom.xml
index f70f7e76..641abf9d 100644
--- a/example/example-domain/example-domain-user/pom.xml
+++ b/example/example-domain/example-domain-user/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
example-domain
- 3.4.2
+ 3.4.3
../pom.xml
diff --git a/example/example-domain/pom.xml b/example/example-domain/pom.xml
index 9ff75794..e0b9e95d 100644
--- a/example/example-domain/pom.xml
+++ b/example/example-domain/pom.xml
@@ -5,7 +5,7 @@
com.codingapi.springboot
springboot-example
- 3.4.2
+ 3.4.3
../pom.xml
4.0.0
diff --git a/example/example-infra/example-infra-flow/pom.xml b/example/example-infra/example-infra-flow/pom.xml
index 6cebb52c..d5c0e706 100644
--- a/example/example-infra/example-infra-flow/pom.xml
+++ b/example/example-infra/example-infra-flow/pom.xml
@@ -5,7 +5,7 @@
com.codingapi.springboot
example-infra
- 3.4.2
+ 3.4.3
../pom.xml
diff --git a/example/example-infra/example-infra-jpa/pom.xml b/example/example-infra/example-infra-jpa/pom.xml
index 8e6d6e7b..c4ee5d01 100644
--- a/example/example-infra/example-infra-jpa/pom.xml
+++ b/example/example-infra/example-infra-jpa/pom.xml
@@ -5,7 +5,7 @@
com.codingapi.springboot
example-infra
- 3.4.2
+ 3.4.3
../pom.xml
diff --git a/example/example-infra/example-infra-security/pom.xml b/example/example-infra/example-infra-security/pom.xml
index 22e622d7..c00e3853 100644
--- a/example/example-infra/example-infra-security/pom.xml
+++ b/example/example-infra/example-infra-security/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
example-infra
- 3.4.2
+ 3.4.3
../pom.xml
diff --git a/example/example-infra/pom.xml b/example/example-infra/pom.xml
index 82a22b8f..f5717b3c 100644
--- a/example/example-infra/pom.xml
+++ b/example/example-infra/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
springboot-example
- 3.4.2
+ 3.4.3
../pom.xml
pom
diff --git a/example/example-interface/pom.xml b/example/example-interface/pom.xml
index 30876bc8..e16ae049 100644
--- a/example/example-interface/pom.xml
+++ b/example/example-interface/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
springboot-example
- 3.4.2
+ 3.4.3
example-interface
diff --git a/example/example-server/pom.xml b/example/example-server/pom.xml
index ba8bdadd..461be7b9 100644
--- a/example/example-server/pom.xml
+++ b/example/example-server/pom.xml
@@ -5,7 +5,7 @@
springboot-example
com.codingapi.springboot
- 3.4.2
+ 3.4.3
4.0.0
diff --git a/example/pom.xml b/example/pom.xml
index 79ca6bc1..972fa22b 100644
--- a/example/pom.xml
+++ b/example/pom.xml
@@ -19,7 +19,7 @@
springboot-example
- 3.4.2
+ 3.4.3
springboot-example
springboot-example project for Spring Boot
diff --git a/pom.xml b/pom.xml
index 552430d2..747b3b7b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -12,7 +12,7 @@
com.codingapi.springboot
springboot-parent
- 3.4.2
+ 3.4.3
https://github.com/codingapi/springboot-framewrok
springboot-parent
diff --git a/springboot-starter-data-authorization/pom.xml b/springboot-starter-data-authorization/pom.xml
index 727cb6b3..5f8c1745 100644
--- a/springboot-starter-data-authorization/pom.xml
+++ b/springboot-starter-data-authorization/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
springboot-parent
- 3.4.2
+ 3.4.3
springboot-starter-data-authorization
diff --git a/springboot-starter-data-fast/pom.xml b/springboot-starter-data-fast/pom.xml
index b817b201..42dad582 100644
--- a/springboot-starter-data-fast/pom.xml
+++ b/springboot-starter-data-fast/pom.xml
@@ -5,7 +5,7 @@
springboot-parent
com.codingapi.springboot
- 3.4.2
+ 3.4.3
4.0.0
diff --git a/springboot-starter-flow/pom.xml b/springboot-starter-flow/pom.xml
index 1835a4e3..b7da735f 100644
--- a/springboot-starter-flow/pom.xml
+++ b/springboot-starter-flow/pom.xml
@@ -6,7 +6,7 @@
springboot-parent
com.codingapi.springboot
- 3.4.2
+ 3.4.3
springboot-starter-flow
diff --git a/springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/service/FlowNodeService.java b/springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/service/FlowNodeService.java
index b2827d3c..5cd7eebb 100644
--- a/springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/service/FlowNodeService.java
+++ b/springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/service/FlowNodeService.java
@@ -162,7 +162,7 @@ public void loadCustomBackNode(FlowNode flowNode, long parentRecordId) {
}
this.nextNode = nextNode;
this.nextOperator = flowOperator;
- this.backOperator = flowOperator;
+ this.backOperator = null;
}
diff --git a/springboot-starter-security/pom.xml b/springboot-starter-security/pom.xml
index 7d813be7..a8b5ad5e 100644
--- a/springboot-starter-security/pom.xml
+++ b/springboot-starter-security/pom.xml
@@ -6,7 +6,7 @@
springboot-parent
com.codingapi.springboot
- 3.4.2
+ 3.4.3
springboot-starter-security
diff --git a/springboot-starter/pom.xml b/springboot-starter/pom.xml
index acc256de..32ecdd29 100644
--- a/springboot-starter/pom.xml
+++ b/springboot-starter/pom.xml
@@ -5,7 +5,7 @@
com.codingapi.springboot
springboot-parent
- 3.4.2
+ 3.4.3
springboot-starter
diff --git a/springboot-starter/src/main/resources/banner.txt b/springboot-starter/src/main/resources/banner.txt
index 4d7d4d37..6b9cef9a 100644
--- a/springboot-starter/src/main/resources/banner.txt
+++ b/springboot-starter/src/main/resources/banner.txt
@@ -1,4 +1,4 @@
------------------------------------------------------
-CodingApi SpringBoot-Starter 3.4.2
+CodingApi SpringBoot-Starter 3.4.3
springboot version (${spring-boot.version})
------------------------------------------------------
From 1476fefe6673241f22219ccc249703b6819a7e43 Mon Sep 17 00:00:00 2001
From: lorne <1991wangliang@gmail.com>
Date: Mon, 16 Jun 2025 17:09:23 +0800
Subject: [PATCH 2/3] fix ui-framework
---
admin-ui/package.json | 6 +++---
mobile-ui/package.json | 6 +++---
mobile-ui/src/config/flows.tsx | 2 +-
mobile-ui/src/config/route.tsx | 6 +++---
mobile-ui/src/config/theme.tsx | 2 +-
mobile-ui/src/pages/{levave => leave}/create.tsx | 2 +-
mobile-ui/src/pages/{levave => leave}/detail.tsx | 2 +-
mobile-ui/src/pages/{levave => leave}/fields.ts | 0
mobile-ui/src/pages/{levave => leave}/form.tsx | 2 +-
mobile-ui/src/pages/{levave => leave}/index.tsx | 0
10 files changed, 14 insertions(+), 14 deletions(-)
rename mobile-ui/src/pages/{levave => leave}/create.tsx (94%)
rename mobile-ui/src/pages/{levave => leave}/detail.tsx (92%)
rename mobile-ui/src/pages/{levave => leave}/fields.ts (100%)
rename mobile-ui/src/pages/{levave => leave}/form.tsx (99%)
rename mobile-ui/src/pages/{levave => leave}/index.tsx (100%)
diff --git a/admin-ui/package.json b/admin-ui/package.json
index 1ae79b1c..cf375011 100644
--- a/admin-ui/package.json
+++ b/admin-ui/package.json
@@ -6,9 +6,9 @@
"@ant-design/icons": "^5.4.0",
"@ant-design/pro-components": "^2.8.7",
"@babel/standalone": "^7.25.6",
- "@codingapi/flow-pc": "^0.0.39",
- "@codingapi/form-pc": "^0.0.39",
- "@codingapi/ui-framework": "^0.0.39",
+ "@codingapi/flow-pc": "^0.0.41",
+ "@codingapi/form-pc": "^0.0.41",
+ "@codingapi/ui-framework": "^0.0.41",
"@dnd-kit/core": "^6.2.0",
"@dnd-kit/sortable": "^9.0.0",
"@handsontable/react-wrapper": "^15.0.0",
diff --git a/mobile-ui/package.json b/mobile-ui/package.json
index 12472531..92710816 100644
--- a/mobile-ui/package.json
+++ b/mobile-ui/package.json
@@ -4,9 +4,9 @@
"private": true,
"dependencies": {
"@babel/standalone": "^7.25.6",
- "@codingapi/flow-mobile": "^0.0.39",
- "@codingapi/form-mobile": "^0.0.39",
- "@codingapi/ui-framework": "^0.0.39",
+ "@codingapi/flow-mobile": "^0.0.41",
+ "@codingapi/form-mobile": "^0.0.41",
+ "@codingapi/ui-framework": "^0.0.41",
"@logicflow/core": "^2.0.10",
"@logicflow/extension": "^2.0.14",
"@reduxjs/toolkit": "^2.2.7",
diff --git a/mobile-ui/src/config/flows.tsx b/mobile-ui/src/config/flows.tsx
index 09c61cd2..35b1fd21 100644
--- a/mobile-ui/src/config/flows.tsx
+++ b/mobile-ui/src/config/flows.tsx
@@ -1,4 +1,4 @@
-import LeaveForm from "@/pages/levave/form";
+import LeaveForm from "@/pages/leave/form";
export const flowViews = {
"default":LeaveForm
diff --git a/mobile-ui/src/config/route.tsx b/mobile-ui/src/config/route.tsx
index 11db7c6d..fd8cedf9 100644
--- a/mobile-ui/src/config/route.tsx
+++ b/mobile-ui/src/config/route.tsx
@@ -5,11 +5,11 @@ import HomePage from "@/pages/home";
import {Route} from "react-router";
import {RouteObject} from "react-router/dist/lib/context";
import React from "react";
-import LeaveListPage from "@/pages/levave";
-import LeaveCreatePage from "@/pages/levave/create";
+import LeaveListPage from "@/pages/leave";
+import LeaveCreatePage from "@/pages/leave/create";
import FlowListPage from "@/pages/flow";
import FlowDetailPage from "@/pages/flow/detail";
-import LeaveDetailPage from "@/pages/levave/detail";
+import LeaveDetailPage from "@/pages/leave/detail";
import FormPage from "@/pages/form";
import MircoPage from "@/pages/mirco";
diff --git a/mobile-ui/src/config/theme.tsx b/mobile-ui/src/config/theme.tsx
index 603e8a70..754f9057 100644
--- a/mobile-ui/src/config/theme.tsx
+++ b/mobile-ui/src/config/theme.tsx
@@ -10,7 +10,7 @@ export const config = {
// 主题配置
theme: theme,
// 后台名称
- title: 'HR-人力资源管理系统',
+ title: 'Admin-UI',
// 后台logo
logo: 'static://assets/logo.png',
// 欢迎页路径
diff --git a/mobile-ui/src/pages/levave/create.tsx b/mobile-ui/src/pages/leave/create.tsx
similarity index 94%
rename from mobile-ui/src/pages/levave/create.tsx
rename to mobile-ui/src/pages/leave/create.tsx
index 5c7c5dbf..f10ef3c6 100644
--- a/mobile-ui/src/pages/levave/create.tsx
+++ b/mobile-ui/src/pages/leave/create.tsx
@@ -1,7 +1,7 @@
import React from "react";
import Header from "@/layout/Header";
import {FlowView} from "@codingapi/flow-mobile";
-import LeaveForm from "@/pages/levave/form";
+import LeaveForm from "@/pages/leave/form";
import {useNavigate} from "react-router";
const LeaveCreatePage = () => {
diff --git a/mobile-ui/src/pages/levave/detail.tsx b/mobile-ui/src/pages/leave/detail.tsx
similarity index 92%
rename from mobile-ui/src/pages/levave/detail.tsx
rename to mobile-ui/src/pages/leave/detail.tsx
index d836238d..4a7a0739 100644
--- a/mobile-ui/src/pages/levave/detail.tsx
+++ b/mobile-ui/src/pages/leave/detail.tsx
@@ -2,7 +2,7 @@ import React from "react";
import Header from "@/layout/Header";
import {useLocation} from "react-router";
import {Descriptions} from "@codingapi/form-mobile";
-import {fields} from "@/pages/levave/fields";
+import {fields} from "@/pages/leave/fields";
const LeaveDetailPage = () => {
diff --git a/mobile-ui/src/pages/levave/fields.ts b/mobile-ui/src/pages/leave/fields.ts
similarity index 100%
rename from mobile-ui/src/pages/levave/fields.ts
rename to mobile-ui/src/pages/leave/fields.ts
diff --git a/mobile-ui/src/pages/levave/form.tsx b/mobile-ui/src/pages/leave/form.tsx
similarity index 99%
rename from mobile-ui/src/pages/levave/form.tsx
rename to mobile-ui/src/pages/leave/form.tsx
index 043aa6cd..724aaf3f 100644
--- a/mobile-ui/src/pages/levave/form.tsx
+++ b/mobile-ui/src/pages/leave/form.tsx
@@ -3,7 +3,7 @@ import {Form} from "@codingapi/form-mobile";
import {FlowFormViewProps} from "@codingapi/ui-framework";
import {Button, Toast} from "antd-mobile";
import {FlowViewReactContext} from "@codingapi/flow-mobile";
-import {fields} from "@/pages/levave/fields";
+import {fields} from "@/pages/leave/fields";
const LeaveForm: React.FC = (props) => {
const flowViewReactContext = useContext(FlowViewReactContext);
diff --git a/mobile-ui/src/pages/levave/index.tsx b/mobile-ui/src/pages/leave/index.tsx
similarity index 100%
rename from mobile-ui/src/pages/levave/index.tsx
rename to mobile-ui/src/pages/leave/index.tsx
From a5538640e28ed609ba883e94f1c3ac33e970f457 Mon Sep 17 00:00:00 2001
From: lorne <1991wangliang@gmail.com>
Date: Fri, 20 Jun 2025 21:38:53 +0800
Subject: [PATCH 3/3] add HttpSecurityCustomer
---
.../example-app-cmd-domain/pom.xml | 2 +-
.../example-app/example-app-cmd-meta/pom.xml | 2 +-
example/example-app/example-app-query/pom.xml | 2 +-
example/example-app/pom.xml | 2 +-
.../example-domain-leave/pom.xml | 2 +-
.../example-domain-user/pom.xml | 2 +-
example/example-domain/pom.xml | 2 +-
.../example-infra/example-infra-flow/pom.xml | 2 +-
.../example-infra/example-infra-jpa/pom.xml | 2 +-
.../example-infra-security/pom.xml | 2 +-
example/example-infra/pom.xml | 2 +-
example/example-interface/pom.xml | 2 +-
example/example-server/pom.xml | 2 +-
example/pom.xml | 2 +-
pom.xml | 2 +-
springboot-starter-data-authorization/pom.xml | 2 +-
springboot-starter-data-fast/pom.xml | 2 +-
springboot-starter-flow/pom.xml | 2 +-
springboot-starter-security/pom.xml | 2 +-
.../security/AutoConfiguration.java | 35 +++++++------
.../customer/DefaultHttpSecurityCustomer.java | 51 +++++++++++++++++++
.../customer/HttpSecurityCustomer.java | 9 ++++
.../CodingApiSecurityProperties.java | 10 ++++
springboot-starter/pom.xml | 2 +-
.../src/main/resources/banner.txt | 2 +-
25 files changed, 108 insertions(+), 39 deletions(-)
create mode 100644 springboot-starter-security/src/main/java/com/codingapi/springboot/security/customer/DefaultHttpSecurityCustomer.java
create mode 100644 springboot-starter-security/src/main/java/com/codingapi/springboot/security/customer/HttpSecurityCustomer.java
diff --git a/example/example-app/example-app-cmd-domain/pom.xml b/example/example-app/example-app-cmd-domain/pom.xml
index 694235b6..5e6252ae 100644
--- a/example/example-app/example-app-cmd-domain/pom.xml
+++ b/example/example-app/example-app-cmd-domain/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
example-app
- 3.4.3
+ 3.4.4
../pom.xml
diff --git a/example/example-app/example-app-cmd-meta/pom.xml b/example/example-app/example-app-cmd-meta/pom.xml
index f72a35c1..0da17be4 100644
--- a/example/example-app/example-app-cmd-meta/pom.xml
+++ b/example/example-app/example-app-cmd-meta/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
example-app
- 3.4.3
+ 3.4.4
../pom.xml
diff --git a/example/example-app/example-app-query/pom.xml b/example/example-app/example-app-query/pom.xml
index 244a0a3a..a9e68348 100644
--- a/example/example-app/example-app-query/pom.xml
+++ b/example/example-app/example-app-query/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
example-app
- 3.4.3
+ 3.4.4
../pom.xml
diff --git a/example/example-app/pom.xml b/example/example-app/pom.xml
index 498e1c33..dedf666e 100644
--- a/example/example-app/pom.xml
+++ b/example/example-app/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
springboot-example
- 3.4.3
+ 3.4.4
../pom.xml
pom
diff --git a/example/example-domain/example-domain-leave/pom.xml b/example/example-domain/example-domain-leave/pom.xml
index 1b191e07..38ec775a 100644
--- a/example/example-domain/example-domain-leave/pom.xml
+++ b/example/example-domain/example-domain-leave/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
example-domain
- 3.4.3
+ 3.4.4
../pom.xml
diff --git a/example/example-domain/example-domain-user/pom.xml b/example/example-domain/example-domain-user/pom.xml
index 641abf9d..10e4e34e 100644
--- a/example/example-domain/example-domain-user/pom.xml
+++ b/example/example-domain/example-domain-user/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
example-domain
- 3.4.3
+ 3.4.4
../pom.xml
diff --git a/example/example-domain/pom.xml b/example/example-domain/pom.xml
index e0b9e95d..90f33ec8 100644
--- a/example/example-domain/pom.xml
+++ b/example/example-domain/pom.xml
@@ -5,7 +5,7 @@
com.codingapi.springboot
springboot-example
- 3.4.3
+ 3.4.4
../pom.xml
4.0.0
diff --git a/example/example-infra/example-infra-flow/pom.xml b/example/example-infra/example-infra-flow/pom.xml
index d5c0e706..768ec2e1 100644
--- a/example/example-infra/example-infra-flow/pom.xml
+++ b/example/example-infra/example-infra-flow/pom.xml
@@ -5,7 +5,7 @@
com.codingapi.springboot
example-infra
- 3.4.3
+ 3.4.4
../pom.xml
diff --git a/example/example-infra/example-infra-jpa/pom.xml b/example/example-infra/example-infra-jpa/pom.xml
index c4ee5d01..b4ed72fb 100644
--- a/example/example-infra/example-infra-jpa/pom.xml
+++ b/example/example-infra/example-infra-jpa/pom.xml
@@ -5,7 +5,7 @@
com.codingapi.springboot
example-infra
- 3.4.3
+ 3.4.4
../pom.xml
diff --git a/example/example-infra/example-infra-security/pom.xml b/example/example-infra/example-infra-security/pom.xml
index c00e3853..122e166c 100644
--- a/example/example-infra/example-infra-security/pom.xml
+++ b/example/example-infra/example-infra-security/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
example-infra
- 3.4.3
+ 3.4.4
../pom.xml
diff --git a/example/example-infra/pom.xml b/example/example-infra/pom.xml
index f5717b3c..cee76323 100644
--- a/example/example-infra/pom.xml
+++ b/example/example-infra/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
springboot-example
- 3.4.3
+ 3.4.4
../pom.xml
pom
diff --git a/example/example-interface/pom.xml b/example/example-interface/pom.xml
index e16ae049..9a41c37a 100644
--- a/example/example-interface/pom.xml
+++ b/example/example-interface/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
springboot-example
- 3.4.3
+ 3.4.4
example-interface
diff --git a/example/example-server/pom.xml b/example/example-server/pom.xml
index 461be7b9..c2dcedab 100644
--- a/example/example-server/pom.xml
+++ b/example/example-server/pom.xml
@@ -5,7 +5,7 @@
springboot-example
com.codingapi.springboot
- 3.4.3
+ 3.4.4
4.0.0
diff --git a/example/pom.xml b/example/pom.xml
index 972fa22b..c303c80c 100644
--- a/example/pom.xml
+++ b/example/pom.xml
@@ -19,7 +19,7 @@
springboot-example
- 3.4.3
+ 3.4.4
springboot-example
springboot-example project for Spring Boot
diff --git a/pom.xml b/pom.xml
index 747b3b7b..e05b1385 100644
--- a/pom.xml
+++ b/pom.xml
@@ -12,7 +12,7 @@
com.codingapi.springboot
springboot-parent
- 3.4.3
+ 3.4.4
https://github.com/codingapi/springboot-framewrok
springboot-parent
diff --git a/springboot-starter-data-authorization/pom.xml b/springboot-starter-data-authorization/pom.xml
index 5f8c1745..038ac8b5 100644
--- a/springboot-starter-data-authorization/pom.xml
+++ b/springboot-starter-data-authorization/pom.xml
@@ -6,7 +6,7 @@
com.codingapi.springboot
springboot-parent
- 3.4.3
+ 3.4.4
springboot-starter-data-authorization
diff --git a/springboot-starter-data-fast/pom.xml b/springboot-starter-data-fast/pom.xml
index 42dad582..2f317b13 100644
--- a/springboot-starter-data-fast/pom.xml
+++ b/springboot-starter-data-fast/pom.xml
@@ -5,7 +5,7 @@
springboot-parent
com.codingapi.springboot
- 3.4.3
+ 3.4.4
4.0.0
diff --git a/springboot-starter-flow/pom.xml b/springboot-starter-flow/pom.xml
index b7da735f..567a4388 100644
--- a/springboot-starter-flow/pom.xml
+++ b/springboot-starter-flow/pom.xml
@@ -6,7 +6,7 @@
springboot-parent
com.codingapi.springboot
- 3.4.3
+ 3.4.4
springboot-starter-flow
diff --git a/springboot-starter-security/pom.xml b/springboot-starter-security/pom.xml
index a8b5ad5e..6cc96320 100644
--- a/springboot-starter-security/pom.xml
+++ b/springboot-starter-security/pom.xml
@@ -6,7 +6,7 @@
springboot-parent
com.codingapi.springboot
- 3.4.3
+ 3.4.4
springboot-starter-security
diff --git a/springboot-starter-security/src/main/java/com/codingapi/springboot/security/AutoConfiguration.java b/springboot-starter-security/src/main/java/com/codingapi/springboot/security/AutoConfiguration.java
index 2f40a953..fdc348df 100644
--- a/springboot-starter-security/src/main/java/com/codingapi/springboot/security/AutoConfiguration.java
+++ b/springboot-starter-security/src/main/java/com/codingapi/springboot/security/AutoConfiguration.java
@@ -2,6 +2,8 @@
import com.codingapi.springboot.security.configurer.HttpSecurityConfigurer;
import com.codingapi.springboot.security.controller.VersionController;
+import com.codingapi.springboot.security.customer.DefaultHttpSecurityCustomer;
+import com.codingapi.springboot.security.customer.HttpSecurityCustomer;
import com.codingapi.springboot.security.dto.request.LoginRequest;
import com.codingapi.springboot.security.dto.response.LoginResponse;
import com.codingapi.springboot.security.filter.*;
@@ -21,6 +23,7 @@
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
+import org.springframework.security.config.annotation.web.configurers.HeadersConfigurer;
import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
@@ -89,28 +92,24 @@ public AuthenticationTokenFilter authenticationTokenFilter() {
};
}
-
@Bean
@ConditionalOnMissingBean
- public SecurityFilterChain filterChain(HttpSecurity security, TokenGateway tokenGateway, SecurityLoginHandler loginHandler,
- CodingApiSecurityProperties properties, AuthenticationTokenFilter authenticationTokenFilter) throws Exception {
- //disable basic auth
- security.httpBasic(AbstractHttpConfigurer::disable);
-
- //before add addCorsMappings to enable cors.
- security.cors(httpSecurityCorsConfigurer -> {
- if (properties.isDisableCors()) {
- httpSecurityCorsConfigurer.disable();
- }
- });
-
- security.csrf(httpSecurityCsrfConfigurer -> {
- if (properties.isDisableCsrf()) {
- httpSecurityCsrfConfigurer.disable();
- }
- });
+ public HttpSecurityCustomer httpSecurityCustomer(CodingApiSecurityProperties properties){
+ return new DefaultHttpSecurityCustomer(properties);
+ }
+ @Bean
+ @ConditionalOnMissingBean
+ public SecurityFilterChain filterChain(HttpSecurity security,
+ HttpSecurityCustomer httpSecurityCustomer,
+ TokenGateway tokenGateway,
+ SecurityLoginHandler loginHandler,
+ CodingApiSecurityProperties properties,
+ AuthenticationTokenFilter authenticationTokenFilter) throws Exception {
+ httpSecurityCustomer.customize(security);
+
+ //authentication filter
security.with(new HttpSecurityConfigurer(tokenGateway, loginHandler, properties, authenticationTokenFilter), Customizer.withDefaults());
security.exceptionHandling(httpSecurityExceptionHandlingConfigurer ->
httpSecurityExceptionHandlingConfigurer.authenticationEntryPoint(new MyUnAuthenticationEntryPoint())
diff --git a/springboot-starter-security/src/main/java/com/codingapi/springboot/security/customer/DefaultHttpSecurityCustomer.java b/springboot-starter-security/src/main/java/com/codingapi/springboot/security/customer/DefaultHttpSecurityCustomer.java
new file mode 100644
index 00000000..dfff8208
--- /dev/null
+++ b/springboot-starter-security/src/main/java/com/codingapi/springboot/security/customer/DefaultHttpSecurityCustomer.java
@@ -0,0 +1,51 @@
+package com.codingapi.springboot.security.customer;
+
+import com.codingapi.springboot.security.properties.CodingApiSecurityProperties;
+import lombok.AllArgsConstructor;
+import org.springframework.security.config.Customizer;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
+import org.springframework.security.config.annotation.web.configurers.HeadersConfigurer;
+
+@AllArgsConstructor
+public class DefaultHttpSecurityCustomer implements HttpSecurityCustomer {
+
+ private final CodingApiSecurityProperties properties;
+
+ @Override
+ public void customize(HttpSecurity security) throws Exception {
+
+ //disable basic auth
+ if (properties.isDisableBasicAuth()) {
+ security.httpBasic(AbstractHttpConfigurer::disable);
+ }
+
+ //disable frame options
+ if (properties.isDisableFrameOptions()) {
+ security.headers(new Customizer>() {
+ @Override
+ public void customize(HeadersConfigurer httpSecurityHeadersConfigurer) {
+ httpSecurityHeadersConfigurer.frameOptions(new Customizer.FrameOptionsConfig>() {
+ @Override
+ public void customize(HeadersConfigurer.FrameOptionsConfig frameOptionsConfig) {
+ frameOptionsConfig.disable();
+ }
+ });
+ }
+ });
+ }
+
+ //before add addCorsMappings to enable cors.
+ security.cors(httpSecurityCorsConfigurer -> {
+ if (properties.isDisableCors()) {
+ httpSecurityCorsConfigurer.disable();
+ }
+ });
+
+ security.csrf(httpSecurityCsrfConfigurer -> {
+ if (properties.isDisableCsrf()) {
+ httpSecurityCsrfConfigurer.disable();
+ }
+ });
+ }
+}
diff --git a/springboot-starter-security/src/main/java/com/codingapi/springboot/security/customer/HttpSecurityCustomer.java b/springboot-starter-security/src/main/java/com/codingapi/springboot/security/customer/HttpSecurityCustomer.java
new file mode 100644
index 00000000..ddc35dd6
--- /dev/null
+++ b/springboot-starter-security/src/main/java/com/codingapi/springboot/security/customer/HttpSecurityCustomer.java
@@ -0,0 +1,9 @@
+package com.codingapi.springboot.security.customer;
+
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+
+public interface HttpSecurityCustomer {
+
+ void customize(HttpSecurity security) throws Exception;
+
+}
diff --git a/springboot-starter-security/src/main/java/com/codingapi/springboot/security/properties/CodingApiSecurityProperties.java b/springboot-starter-security/src/main/java/com/codingapi/springboot/security/properties/CodingApiSecurityProperties.java
index 4a33d91b..1798bc09 100644
--- a/springboot-starter-security/src/main/java/com/codingapi/springboot/security/properties/CodingApiSecurityProperties.java
+++ b/springboot-starter-security/src/main/java/com/codingapi/springboot/security/properties/CodingApiSecurityProperties.java
@@ -39,6 +39,16 @@ public class CodingApiSecurityProperties {
private String aseIv = "QUNYRkdIQEVEUyNYQ1phcw==";
+ /**
+ * 禁用Basic Auth
+ */
+ private boolean disableBasicAuth = true;
+
+ /**
+ * 禁用FrameOptions
+ */
+ private boolean disableFrameOptions = true;
+
/**
* 启用禁用CSRF
*/
diff --git a/springboot-starter/pom.xml b/springboot-starter/pom.xml
index 32ecdd29..fd60a122 100644
--- a/springboot-starter/pom.xml
+++ b/springboot-starter/pom.xml
@@ -5,7 +5,7 @@
com.codingapi.springboot
springboot-parent
- 3.4.3
+ 3.4.4
springboot-starter
diff --git a/springboot-starter/src/main/resources/banner.txt b/springboot-starter/src/main/resources/banner.txt
index 6b9cef9a..cb247fec 100644
--- a/springboot-starter/src/main/resources/banner.txt
+++ b/springboot-starter/src/main/resources/banner.txt
@@ -1,4 +1,4 @@
------------------------------------------------------
-CodingApi SpringBoot-Starter 3.4.3
+CodingApi SpringBoot-Starter 3.4.4
springboot version (${spring-boot.version})
------------------------------------------------------