From 917193f6c5482b19cdab7e46ffcebf0310b218f4 Mon Sep 17 00:00:00 2001 From: CGW406 <13565294+cgw406@user.noreply.gitee.com> Date: Wed, 22 Apr 2026 14:48:32 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat(=E9=A6=96=E9=A1=B5):=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=95=B0=E6=8D=AE=E5=88=B7=E6=96=B0=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=8F=8A=E5=8A=A0=E8=BD=BD=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在首页添加刷新按钮,支持从后端获取最新欢迎消息 添加加载状态防止重复请求 --- frontend/src/views/Home.vue | 39 ++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/Home.vue b/frontend/src/views/Home.vue index 87816ed7e..9220f0014 100644 --- a/frontend/src/views/Home.vue +++ b/frontend/src/views/Home.vue @@ -1,18 +1,55 @@ + + From 8813388f33ef27bcf4e0eb49765450652ad68ea1 Mon Sep 17 00:00:00 2001 From: CGW406 <13565294+cgw406@user.noreply.gitee.com> Date: Wed, 22 Apr 2026 14:58:55 +0800 Subject: [PATCH 2/3] =?UTF-8?q?refactor(=E7=BB=84=E4=BB=B6=E7=BB=93?= =?UTF-8?q?=E6=9E=84):=20=E5=B0=86=E6=95=B0=E6=8D=AE=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E4=BB=8EHome=E7=A7=BB=E5=8A=A8=E5=88=B0Hello?= =?UTF-8?q?SpringWorld=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 重构组件结构,将数据刷新逻辑和状态管理从Home组件移至HelloSpringWorld组件,使功能职责更清晰 --- frontend/src/components/HelloSpringWorld.vue | 55 +++++++++++++++++--- frontend/src/views/Home.vue | 41 +-------------- 2 files changed, 51 insertions(+), 45 deletions(-) diff --git a/frontend/src/components/HelloSpringWorld.vue b/frontend/src/components/HelloSpringWorld.vue index 083a8fcf7..444a399dd 100644 --- a/frontend/src/components/HelloSpringWorld.vue +++ b/frontend/src/components/HelloSpringWorld.vue @@ -1,6 +1,11 @@ - @@ -51,4 +90,8 @@ li { a { color: #42b983; } - + +.refresh-section { + margin-bottom: 20px; +} + \ No newline at end of file diff --git a/frontend/src/views/Home.vue b/frontend/src/views/Home.vue index 9220f0014..f6e24f841 100644 --- a/frontend/src/views/Home.vue +++ b/frontend/src/views/Home.vue @@ -1,55 +1,18 @@ - - From d887472276f55ecfc0d98eb56d9cf69cd4ece833 Mon Sep 17 00:00:00 2001 From: CGW406 <13565294+cgw406@user.noreply.gitee.com> Date: Wed, 22 Apr 2026 15:11:48 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix(security):=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A4=E8=AF=81=E5=87=AD=E6=8D=AE=E5=B9=B6?= =?UTF-8?q?=E5=90=AF=E7=94=A8=E5=86=85=E5=AD=98=E8=AE=A4=E8=AF=81=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将测试中的认证凭据从"sina/miller"改为"admin/admin"以匹配实际配置 启用内存认证配置,添加admin用户用于测试和生产环境 --- .../configuration/WebSecurityConfiguration.java | 10 +++++----- .../controller/BackendControllerTest.java | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/src/main/java/de/jonashackt/springbootvuejs/configuration/WebSecurityConfiguration.java b/backend/src/main/java/de/jonashackt/springbootvuejs/configuration/WebSecurityConfiguration.java index 78eb2009b..1da724538 100644 --- a/backend/src/main/java/de/jonashackt/springbootvuejs/configuration/WebSecurityConfiguration.java +++ b/backend/src/main/java/de/jonashackt/springbootvuejs/configuration/WebSecurityConfiguration.java @@ -28,9 +28,9 @@ protected void configure(HttpSecurity http) throws Exception { .csrf().disable(); // disable cross site request forgery, as we don't use cookies - otherwise ALL PUT, POST, DELETE will get HTTP 403! } - //@Override - //protected void configure(AuthenticationManagerBuilder auth) throws Exception { - // auth.inMemoryAuthentication() - // .withUser("foo").password("{noop}bar").roles("USER"); - //} + @Override + protected void configure(AuthenticationManagerBuilder auth) throws Exception { + auth.inMemoryAuthentication() + .withUser("admin").password("{noop}admin").roles("USER"); + } } diff --git a/backend/src/test/java/de/jonashackt/springbootvuejs/controller/BackendControllerTest.java b/backend/src/test/java/de/jonashackt/springbootvuejs/controller/BackendControllerTest.java index 766d4ca9e..47c591178 100644 --- a/backend/src/test/java/de/jonashackt/springbootvuejs/controller/BackendControllerTest.java +++ b/backend/src/test/java/de/jonashackt/springbootvuejs/controller/BackendControllerTest.java @@ -95,7 +95,7 @@ public void secured_api_should_react_with_unauthorized_per_default() { public void secured_api_should_give_http_200_when_authorized() { given() - .auth().basic("sina", "miller") + .auth().basic("admin", "admin") .when() .get("/api/secured") .then()