From 276e8bf9ff33cdc3f44bcc774267264e26ccc846 Mon Sep 17 00:00:00 2001 From: Leslie Date: Fri, 29 Aug 2025 00:24:09 +0800 Subject: [PATCH] fixed: 修复因执行顺序影响到跨域配置不生效问题 --- yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/config/YudaoWebAutoConfiguration.java | 2 ++ 1 file changed, 2 insertions(+), 0 deletions(-) diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/config/YudaoWebAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/config/YudaoWebAutoConfiguration.java index 9126c7e..763bab9 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/config/YudaoWebAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/config/YudaoWebAutoConfiguration.java @@ -18,6 +18,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties import org.springframework.boot.web.client.RestTemplateBuilder; import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.context.annotation.Bean; +import org.springframework.core.annotation.Order; import org.springframework.util.AntPathMatcher; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.client.RestTemplate; @@ -80,6 +81,7 @@ public class YudaoWebAutoConfiguration implements WebMvcConfigurer { /** * 创建 CorsFilter Bean,解决跨域问题 */ + @Order(value = 0) @Bean public FilterRegistrationBean corsFilterBean() { // 创建 CorsConfiguration 对象 -- libgit2 0.21.4