From 4a23698876bfe47e75502a6ac4dae7e23f902b9b Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 7 Mar 2021 20:21:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=20WebConfiguration=20?= =?UTF-8?q?=E6=B3=A8=E9=87=8A=EF=BC=8C=E5=B8=AE=E5=8A=A9=E9=98=85=E8=AF=BB?= =?UTF-8?q?=E7=9A=84=E4=BA=BA=E7=90=86=E8=A7=A3=20/api=20=E5=89=8D?= =?UTF-8?q?=E7=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- .../《芋道 Spring Boot 安全框架 Spring Security 入门》.md | 1 - .../《芋道 Spring Boot 服务容错 Resilience4j 入门》.md | 1 + .../dashboard/framework/web/config/WebConfiguration.java | 3 ++- 4 files changed, 4 insertions(+), 3 deletions(-) delete mode 100644 src/main/java/cn/iocoder/dashboard/framework/resilience4j/《芋道 Spring Boot 安全框架 Spring Security 入门》.md create mode 100644 src/main/java/cn/iocoder/dashboard/framework/resilience4j/《芋道 Spring Boot 服务容错 Resilience4j 入门》.md diff --git a/README.md b/README.md index 0bc06b7ed..6af0a5447 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ | [MapStruct](https://mapstruct.org/) | Java Bean 转换 | 1.4.1 | [文档](http://www.iocoder.cn/Spring-Boot/MapStruct/?yudao) | | [Lombok](https://projectlombok.org/) | 消除冗长的 Java 代码 | 1.16.14 | [文档](http://www.iocoder.cn/Spring-Boot/Lombok/?yudao) | | [JUnit](https://junit.org/junit5/) | Java 单元测试框架 | 5.7.0 | - | -| [Mockito](https://junit.org/junit5/) | Java Mock 框架 | 3.6.28 | - | +| [Mockito](https://github.com/mockito/mockito) | Java Mock 框架 | 3.6.28 | - | **前端** diff --git a/src/main/java/cn/iocoder/dashboard/framework/resilience4j/《芋道 Spring Boot 安全框架 Spring Security 入门》.md b/src/main/java/cn/iocoder/dashboard/framework/resilience4j/《芋道 Spring Boot 安全框架 Spring Security 入门》.md deleted file mode 100644 index 3fa673793..000000000 --- a/src/main/java/cn/iocoder/dashboard/framework/resilience4j/《芋道 Spring Boot 安全框架 Spring Security 入门》.md +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/main/java/cn/iocoder/dashboard/framework/resilience4j/《芋道 Spring Boot 服务容错 Resilience4j 入门》.md b/src/main/java/cn/iocoder/dashboard/framework/resilience4j/《芋道 Spring Boot 服务容错 Resilience4j 入门》.md new file mode 100644 index 000000000..8d6d0335b --- /dev/null +++ b/src/main/java/cn/iocoder/dashboard/framework/resilience4j/《芋道 Spring Boot 服务容错 Resilience4j 入门》.md @@ -0,0 +1 @@ + diff --git a/src/main/java/cn/iocoder/dashboard/framework/web/config/WebConfiguration.java b/src/main/java/cn/iocoder/dashboard/framework/web/config/WebConfiguration.java index 9fbe6237c..b87c49008 100644 --- a/src/main/java/cn/iocoder/dashboard/framework/web/config/WebConfiguration.java +++ b/src/main/java/cn/iocoder/dashboard/framework/web/config/WebConfiguration.java @@ -27,9 +27,10 @@ public class WebConfiguration implements WebMvcConfigurer { @Override public void configurePathMatch(PathMatchConfigurer configurer) { + // 设置 API 前缀,仅仅匹配 controller 包下的 configurer.addPathPrefix(webProperties.getApiPrefix(), clazz -> clazz.isAnnotationPresent(RestController.class) - && clazz.getPackage().getName().startsWith(webProperties.getControllerPackage())); + && clazz.getPackage().getName().startsWith(webProperties.getControllerPackage())); // 仅仅匹配 controller 包 } // ========== Filter 相关 ==========