egd
4cb9af22a2
fix(web): 确保在 Bean 创建前映射应用请求前缀
场景:
当 app 和 admin 下的接口地址一致时(比如:/system/user/get),需要依赖前缀(admin-api | app-api)来区分,防止 URI 冲突。
问题:
- 当 xss.enable=true 时,会触发 TechXssAutoConfiguration 中 xssJacksonCustomizer 的构建,间接触发 PathMatcher 注入,调用 DelegatingWebMvcConfiguration.configurePathMatch。
- 此时 RequestMappingHandlerMapping 的 mapping 还未加上前缀。
- 当 api-encrypt.enable=true 时,提前注入的 RequestMappingHandlerMapping 没有前缀,导致接口地址重复报错。
解决:
- 不依赖 DelegatingWebMvcConfiguration 的回调顺序。
- 确保即使其他 Bean 提前触发 Mapping 创建时,也能正确加上前缀,避免 URI 冲突。
2025-09-09 09:51:21 +08:00
..
2025-08-30 17:48:10 +08:00
2025-07-26 23:06:06 +08:00
2025-01-24 20:42:23 +08:00
2025-08-31 10:25:40 +08:00
2025-08-16 21:23:06 +08:00
2025-07-26 20:09:05 +08:00
2025-08-29 20:05:55 +08:00
2025-08-24 15:46:09 +08:00
2025-08-30 09:34:40 +08:00
2025-09-01 13:16:47 +08:00
2025-08-30 10:54:35 +08:00
2024-04-29 12:48:46 +08:00
2024-04-07 19:51:24 +08:00
2025-08-31 10:25:40 +08:00
2024-10-01 14:51:57 +08:00
2025-09-09 09:51:21 +08:00
2024-12-31 09:36:14 +08:00
2024-04-04 02:13:36 +08:00