From 47691cd605c97fe711a3cc47fd27441a1952becf Mon Sep 17 00:00:00 2001 From: gewuyou <1063891901@qq.com> Date: Fri, 2 May 2025 12:20:57 +0800 Subject: [PATCH] feat(webmvc): Improve the priority of API version mapping processing Make sure it executes before all other request mapping handlers by setting the order property of ApiVersionRequestMappingHandlerMapping to Int.MIN_VALUE. This ensures that version control requests are processed first, and improves the system's response speed and efficiency. --- .../forgeboot/webmvc/version/config/VersionAutoConfiguration.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forgeboot-webmvc/forgeboot-webmvc-version-starter/src/main/kotlin/com/gewuyou/forgeboot/webmvc/version/config/VersionAutoConfiguration.kt b/forgeboot-webmvc/forgeboot-webmvc-version-starter/src/main/kotlin/com/gewuyou/forgeboot/webmvc/version/config/VersionAutoConfiguration.kt index a2b5972..93ac99c 100644 --- a/forgeboot-webmvc/forgeboot-webmvc-version-starter/src/main/kotlin/com/gewuyou/forgeboot/webmvc/version/config/VersionAutoConfiguration.kt +++ b/forgeboot-webmvc/forgeboot-webmvc-version-starter/src/main/kotlin/com/gewuyou/forgeboot/webmvc/version/config/VersionAutoConfiguration.kt @@ -28,6 +28,6 @@ open class VersionAutoConfiguration { @Bean open fun apiVersionRequestMappingHandlerMapping(versionProperties: VersionProperties): ApiVersionRequestMappingHandlerMapping { log.info("创建 API 版本请求映射处理程序映射") - return ApiVersionRequestMappingHandlerMapping(versionProperties) + return ApiVersionRequestMappingHandlerMapping(versionProperties).also { it.order = Int.MIN_VALUE } } } \ No newline at end of file