From bf83fe568b1a80a609d84a697e05e75d00f08d9f Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 19 Oct 2022 10:54:01 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E9=A2=9C=E8=89=B2=E5=9C=A8Drawer=E7=BB=84=E4=BB=B6=E4=B8=8D?= =?UTF-8?q?=E4=BC=9A=E5=8A=A0=E8=BD=BD=E9=97=AE=E9=A2=98(I5VCF0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/App.vue | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/ruoyi-ui/src/App.vue b/ruoyi-ui/src/App.vue index 60325ff48..a2c4b872f 100644 --- a/ruoyi-ui/src/App.vue +++ b/ruoyi-ui/src/App.vue @@ -1,12 +1,16 @@ + From 78f4d1c85beff6ffc6adec84bc1affb637e46bd8 Mon Sep 17 00:00:00 2001 From: abbfun <819589789@qq.com> Date: Wed, 19 Oct 2022 09:07:35 +0000 Subject: [PATCH 2/7] =?UTF-8?q?swagger-ui=E9=9D=99=E6=80=81=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: abbfun <819589789@qq.com> --- .../main/java/com/ruoyi/framework/config/ResourcesConfig.java | 3 ++- .../main/java/com/ruoyi/framework/config/SecurityConfig.java | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java index 24ef0dec9..ff1a5e519 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java @@ -33,7 +33,8 @@ public class ResourcesConfig implements WebMvcConfigurer /** swagger配置 */ registry.addResourceHandler("/swagger-ui/**") - .addResourceLocations("classpath:/META-INF/resources/webjars/springfox-swagger-ui/"); + .addResourceLocations("classpath:/META-INF/resources/webjars/springfox-swagger-ui/") + .setCacheControl(CacheControl.maxAge(1, TimeUnit.DAYS).mustRevalidate().cachePrivate()).resourceChain(true); } /** diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java index dfad46e39..3f7fc67cc 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java @@ -124,6 +124,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter // 添加CORS filter httpSecurity.addFilterBefore(corsFilter, JwtAuthenticationTokenFilter.class); httpSecurity.addFilterBefore(corsFilter, LogoutFilter.class); + // 禁用缓存 + httpSecurity.headers().cacheControl().disable(); } /** From b970185536bc58742fc29946b50c487a2de52bac Mon Sep 17 00:00:00 2001 From: kknd97 Date: Thu, 20 Oct 2022 06:27:02 +0000 Subject: [PATCH 3/7] =?UTF-8?q?update=20ruoyi-ui/src/views/system/user/ind?= =?UTF-8?q?ex.vue.=20handleUpdate(row)=E6=96=B9=E6=B3=95=E4=B8=AD=EF=BC=9A?= =?UTF-8?q?this.form=20=3D=20response.data;=E8=AF=AD=E5=8F=A5=20=E4=BC=9A?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E3=80=90this.form.postIds=20=3D=20response.p?= =?UTF-8?q?ostIds;=E3=80=91=E5=92=8C=E3=80=90this.form.roleIds=20=3D=20res?= =?UTF-8?q?ponse.roleIds;=E3=80=91=E5=A4=B1=E6=95=88=E3=80=82=20=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E7=94=A8=E6=88=B7=E7=BC=96=E8=BE=91=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?=E6=A1=86=E4=B8=AD=EF=BC=8C=E8=A7=92=E8=89=B2=E5=92=8C=E9=83=A8?= =?UTF-8?q?=E9=97=A8=E5=A4=9A=E9=80=89=E6=A1=86=E6=97=A0=E6=B3=95=E6=AD=A3?= =?UTF-8?q?=E5=B8=B8=E4=BF=AE=E6=94=B9=E3=80=82=20=E5=BB=BA=E8=AE=AE?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E4=BB=A5=E4=B8=8B=E8=AF=AD=E5=8F=A5=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=9A=20this.$set(this.form,=20"postIds",=20respon?= =?UTF-8?q?se.postIds);=20this.$set(this.form,=20"roleIds",=20response.rol?= =?UTF-8?q?eIds);?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: kknd97 --- ruoyi-ui/src/views/system/user/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue index a26a33f88..2494fa241 100644 --- a/ruoyi-ui/src/views/system/user/index.vue +++ b/ruoyi-ui/src/views/system/user/index.vue @@ -576,8 +576,8 @@ export default { this.form = response.data; this.postOptions = response.posts; this.roleOptions = response.roles; - this.form.postIds = response.postIds; - this.form.roleIds = response.roleIds; + this.$set(this.form, "postIds", response.postIds); + this.$set(this.form, "roleIds", response.roleIds); this.open = true; this.title = "修改用户"; this.form.password = ""; From 9dcddc787628b8dde5b64d66047bb512c8a4bf5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=85=83=E5=8D=9A?= <1553592282@qq.com> Date: Thu, 20 Oct 2022 19:18:10 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B0=8F=E5=B1=8F?= =?UTF-8?q?=E5=B9=95=E4=B8=8A=E4=BF=AE=E6=94=B9=E5=A4=B4=E5=83=8F=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E5=B8=83=E5=B1=80=E9=94=99=E4=BD=8D=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/assets/styles/ruoyi.scss | 547 +++++++++--------- .../views/system/user/profile/userAvatar.vue | 357 ++++++------ 2 files changed, 459 insertions(+), 445 deletions(-) diff --git a/ruoyi-ui/src/assets/styles/ruoyi.scss b/ruoyi-ui/src/assets/styles/ruoyi.scss index e3912cec8..42ec09200 100644 --- a/ruoyi-ui/src/assets/styles/ruoyi.scss +++ b/ruoyi-ui/src/assets/styles/ruoyi.scss @@ -1,273 +1,274 @@ - /** - * 通用css样式布局处理 - * Copyright (c) 2019 ruoyi - */ - - /** 基础通用 **/ -.pt5 { - padding-top: 5px; -} -.pr5 { - padding-right: 5px; -} -.pb5 { - padding-bottom: 5px; -} -.mt5 { - margin-top: 5px; -} -.mr5 { - margin-right: 5px; -} -.mb5 { - margin-bottom: 5px; -} -.mb8 { - margin-bottom: 8px; -} -.ml5 { - margin-left: 5px; -} -.mt10 { - margin-top: 10px; -} -.mr10 { - margin-right: 10px; -} -.mb10 { - margin-bottom: 10px; -} -.ml10 { - margin-left: 10px; -} -.mt20 { - margin-top: 20px; -} -.mr20 { - margin-right: 20px; -} -.mb20 { - margin-bottom: 20px; -} -.ml20 { - margin-left: 20px; -} - -.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 { - font-family: inherit; - font-weight: 500; - line-height: 1.1; - color: inherit; -} - -.el-dialog:not(.is-fullscreen) { - margin-top: 6vh !important; -} - -.el-dialog__wrapper.scrollbar .el-dialog .el-dialog__body { - overflow: auto; - overflow-x: hidden; - max-height: 70vh; - padding: 10px 20px 0; -} - -.el-table { - .el-table__header-wrapper, .el-table__fixed-header-wrapper { - th { - word-break: break-word; - background-color: #f8f8f9; - color: #515a6e; - height: 40px; - font-size: 13px; - } - } - .el-table__body-wrapper { - .el-button [class*="el-icon-"] + span { - margin-left: 1px; - } - } -} - -/** 表单布局 **/ -.form-header { - font-size:15px; - color:#6379bb; - border-bottom:1px solid #ddd; - margin:8px 10px 25px 10px; - padding-bottom:5px -} - -/** 表格布局 **/ -.pagination-container { - position: relative; - height: 25px; - margin-bottom: 10px; - margin-top: 15px; - padding: 10px 20px !important; -} - -/* tree border */ -.tree-border { - margin-top: 5px; - border: 1px solid #e5e6e7; - background: #FFFFFF none; - border-radius:4px; -} - -.pagination-container .el-pagination { - right: 0; - position: absolute; -} - -@media ( max-width : 768px) { - .pagination-container .el-pagination > .el-pagination__jump { - display: none !important; - } - .pagination-container .el-pagination > .el-pagination__sizes { - display: none !important; - } -} - -.el-table .fixed-width .el-button--mini { - padding-left: 0; - padding-right: 0; - width: inherit; -} - -/** 表格更多操作下拉样式 */ -.el-table .el-dropdown-link { - cursor: pointer; - color: #409EFF; - margin-left: 5px; -} - -.el-table .el-dropdown, .el-icon-arrow-down { - font-size: 12px; -} - -.el-tree-node__content > .el-checkbox { - margin-right: 8px; -} - -.list-group-striped > .list-group-item { - border-left: 0; - border-right: 0; - border-radius: 0; - padding-left: 0; - padding-right: 0; -} - -.list-group { - padding-left: 0px; - list-style: none; -} - -.list-group-item { - border-bottom: 1px solid #e7eaec; - border-top: 1px solid #e7eaec; - margin-bottom: -1px; - padding: 11px 0px; - font-size: 13px; -} - -.pull-right { - float: right !important; -} - -.el-card__header { - padding: 14px 15px 7px; - min-height: 40px; -} - -.el-card__body { - padding: 15px 20px 20px 20px; -} - -.card-box { - padding-right: 15px; - padding-left: 15px; - margin-bottom: 10px; -} - -/* button color */ -.el-button--cyan.is-active, -.el-button--cyan:active { - background: #20B2AA; - border-color: #20B2AA; - color: #FFFFFF; -} - -.el-button--cyan:focus, -.el-button--cyan:hover { - background: #48D1CC; - border-color: #48D1CC; - color: #FFFFFF; -} - -.el-button--cyan { - background-color: #20B2AA; - border-color: #20B2AA; - color: #FFFFFF; -} - -/* text color */ -.text-navy { - color: #1ab394; -} - -.text-primary { - color: inherit; -} - -.text-success { - color: #1c84c6; -} - -.text-info { - color: #23c6c8; -} - -.text-warning { - color: #f8ac59; -} - -.text-danger { - color: #ed5565; -} - -.text-muted { - color: #888888; -} - -/* image */ -.img-circle { - border-radius: 50%; -} - -.img-lg { - width: 120px; - height: 120px; -} - -.avatar-upload-preview { - position: absolute; - top: 50%; - transform: translate(50%, -50%); - width: 200px; - height: 200px; - border-radius: 50%; - box-shadow: 0 0 4px #ccc; - overflow: hidden; -} - -/* 拖拽列样式 */ -.sortable-ghost{ - opacity: .8; - color: #fff!important; - background: #42b983!important; -} - -.top-right-btn { - position: relative; - float: right; -} + /** + * 通用css样式布局处理 + * Copyright (c) 2019 ruoyi + */ + + /** 基础通用 **/ +.pt5 { + padding-top: 5px; +} +.pr5 { + padding-right: 5px; +} +.pb5 { + padding-bottom: 5px; +} +.mt5 { + margin-top: 5px; +} +.mr5 { + margin-right: 5px; +} +.mb5 { + margin-bottom: 5px; +} +.mb8 { + margin-bottom: 8px; +} +.ml5 { + margin-left: 5px; +} +.mt10 { + margin-top: 10px; +} +.mr10 { + margin-right: 10px; +} +.mb10 { + margin-bottom: 10px; +} +.ml10 { + margin-left: 10px; +} +.mt20 { + margin-top: 20px; +} +.mr20 { + margin-right: 20px; +} +.mb20 { + margin-bottom: 20px; +} +.ml20 { + margin-left: 20px; +} + +.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 { + font-family: inherit; + font-weight: 500; + line-height: 1.1; + color: inherit; +} + +.el-dialog:not(.is-fullscreen) { + margin-top: 6vh !important; +} + +.el-dialog__wrapper.scrollbar .el-dialog .el-dialog__body { + overflow: auto; + overflow-x: hidden; + max-height: 70vh; + padding: 10px 20px 0; +} + +.el-table { + .el-table__header-wrapper, .el-table__fixed-header-wrapper { + th { + word-break: break-word; + background-color: #f8f8f9; + color: #515a6e; + height: 40px; + font-size: 13px; + } + } + .el-table__body-wrapper { + .el-button [class*="el-icon-"] + span { + margin-left: 1px; + } + } +} + +/** 表单布局 **/ +.form-header { + font-size:15px; + color:#6379bb; + border-bottom:1px solid #ddd; + margin:8px 10px 25px 10px; + padding-bottom:5px +} + +/** 表格布局 **/ +.pagination-container { + position: relative; + height: 25px; + margin-bottom: 10px; + margin-top: 15px; + padding: 10px 20px !important; +} + +/* tree border */ +.tree-border { + margin-top: 5px; + border: 1px solid #e5e6e7; + background: #FFFFFF none; + border-radius:4px; +} + +.pagination-container .el-pagination { + right: 0; + position: absolute; +} + +@media ( max-width : 768px) { + .pagination-container .el-pagination > .el-pagination__jump { + display: none !important; + } + .pagination-container .el-pagination > .el-pagination__sizes { + display: none !important; + } +} + +.el-table .fixed-width .el-button--mini { + padding-left: 0; + padding-right: 0; + width: inherit; +} + +/** 表格更多操作下拉样式 */ +.el-table .el-dropdown-link { + cursor: pointer; + color: #409EFF; + margin-left: 5px; +} + +.el-table .el-dropdown, .el-icon-arrow-down { + font-size: 12px; +} + +.el-tree-node__content > .el-checkbox { + margin-right: 8px; +} + +.list-group-striped > .list-group-item { + border-left: 0; + border-right: 0; + border-radius: 0; + padding-left: 0; + padding-right: 0; +} + +.list-group { + padding-left: 0px; + list-style: none; +} + +.list-group-item { + border-bottom: 1px solid #e7eaec; + border-top: 1px solid #e7eaec; + margin-bottom: -1px; + padding: 11px 0px; + font-size: 13px; +} + +.pull-right { + float: right !important; +} + +.el-card__header { + padding: 14px 15px 7px; + min-height: 40px; +} + +.el-card__body { + padding: 15px 20px 20px 20px; +} + +.card-box { + padding-right: 15px; + padding-left: 15px; + margin-bottom: 10px; +} + +/* button color */ +.el-button--cyan.is-active, +.el-button--cyan:active { + background: #20B2AA; + border-color: #20B2AA; + color: #FFFFFF; +} + +.el-button--cyan:focus, +.el-button--cyan:hover { + background: #48D1CC; + border-color: #48D1CC; + color: #FFFFFF; +} + +.el-button--cyan { + background-color: #20B2AA; + border-color: #20B2AA; + color: #FFFFFF; +} + +/* text color */ +.text-navy { + color: #1ab394; +} + +.text-primary { + color: inherit; +} + +.text-success { + color: #1c84c6; +} + +.text-info { + color: #23c6c8; +} + +.text-warning { + color: #f8ac59; +} + +.text-danger { + color: #ed5565; +} + +.text-muted { + color: #888888; +} + +/* image */ +.img-circle { + border-radius: 50%; +} + +.img-lg { + width: 120px; + height: 120px; +} + +.avatar-upload-preview { + position: relative; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 200px; + height: 200px; + border-radius: 50%; + box-shadow: 0 0 4px #ccc; + overflow: hidden; +} + +/* 拖拽列样式 */ +.sortable-ghost{ + opacity: .8; + color: #fff!important; + background: #42b983!important; +} + +.top-right-btn { + position: relative; + float: right; +} diff --git a/ruoyi-ui/src/views/system/user/profile/userAvatar.vue b/ruoyi-ui/src/views/system/user/profile/userAvatar.vue index 63903a706..361f962eb 100644 --- a/ruoyi-ui/src/views/system/user/profile/userAvatar.vue +++ b/ruoyi-ui/src/views/system/user/profile/userAvatar.vue @@ -1,172 +1,185 @@ - - - - \ No newline at end of file + + + + From 5a60bf0b0afce10565f458ed4f70455198a7b644 Mon Sep 17 00:00:00 2001 From: Rain <938448486@qq.com> Date: Fri, 21 Oct 2022 03:01:54 +0000 Subject: [PATCH 5/7] =?UTF-8?q?=E5=8D=87=E7=BA=A7fastjson=E5=88=B0?= =?UTF-8?q?=E6=9C=80=E6=96=B0=E7=89=882.0.15?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rain <938448486@qq.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c95045b4e..40302ff82 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ 2.3.2 2.2.2 1.4.3 - 2.0.14 + 2.0.15 6.2.2 2.11.0 1.4 From b6153d1aef10638afabc290cac43f1c63342ac6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=85=83=E5=8D=9A?= <1553592282@qq.com> Date: Fri, 21 Oct 2022 11:21:59 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/system/user/profile/userAvatar.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-ui/src/views/system/user/profile/userAvatar.vue b/ruoyi-ui/src/views/system/user/profile/userAvatar.vue index 361f962eb..4e8051363 100644 --- a/ruoyi-ui/src/views/system/user/profile/userAvatar.vue +++ b/ruoyi-ui/src/views/system/user/profile/userAvatar.vue @@ -24,7 +24,7 @@
- + 选择 From e21396870f5e1167dc6bf861e4421120d04f657a Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 21 Oct 2022 11:56:15 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=B3=A8=E9=87=8A=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/common/core/domain/entity/SysMenu.java | 2 +- .../java/com/ruoyi/framework/config/ResourcesConfig.java | 4 +++- .../java/com/ruoyi/framework/config/SecurityConfig.java | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java index 229f41803..9f3a6f659 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java @@ -54,7 +54,7 @@ public class SysMenu extends BaseEntity /** 显示状态(0显示 1隐藏) */ private String visible; - /** 菜单状态(0显示 1隐藏) */ + /** 菜单状态(0正常 1停用) */ private String status; /** 权限字符串 */ diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java index ff1a5e519..4e067a7b1 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java @@ -1,8 +1,10 @@ package com.ruoyi.framework.config; +import java.util.concurrent.TimeUnit; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.http.CacheControl; import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.cors.UrlBasedCorsConfigurationSource; import org.springframework.web.filter.CorsFilter; @@ -34,7 +36,7 @@ public class ResourcesConfig implements WebMvcConfigurer /** swagger配置 */ registry.addResourceHandler("/swagger-ui/**") .addResourceLocations("classpath:/META-INF/resources/webjars/springfox-swagger-ui/") - .setCacheControl(CacheControl.maxAge(1, TimeUnit.DAYS).mustRevalidate().cachePrivate()).resourceChain(true); + .setCacheControl(CacheControl.maxAge(5, TimeUnit.HOURS).cachePublic());; } /** diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java index 3f7fc67cc..bdb7199fe 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java @@ -102,6 +102,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter httpSecurity // CSRF禁用,因为不使用session .csrf().disable() + // 禁用HTTP响应标头 + .headers().cacheControl().disable().and() // 认证失败处理类 .exceptionHandling().authenticationEntryPoint(unauthorizedHandler).and() // 基于token,所以不需要session @@ -109,7 +111,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter // 过滤请求 .authorizeRequests() // 对于登录login 注册register 验证码captchaImage 允许匿名访问 - .antMatchers("/login", "/register", "/captchaImage").anonymous() + .antMatchers("/login", "/register", "/captchaImage").permitAll() // 静态资源,可匿名访问 .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() @@ -124,8 +126,6 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter // 添加CORS filter httpSecurity.addFilterBefore(corsFilter, JwtAuthenticationTokenFilter.class); httpSecurity.addFilterBefore(corsFilter, LogoutFilter.class); - // 禁用缓存 - httpSecurity.headers().cacheControl().disable(); } /**