[BUG] webmvc_v6x适配器中将resourceName的生成逻辑单独拆分出一个实现,但默认无法替换

未关闭
#3,484 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
java, spring
领域
backend

调研方向

定位 SentinelWebPrefixInterceptor 和 issue 中展示的 sentinelWebMvcConfigurer bean 方法,然后检查 webmvc_v6x 适配器如何创建资源名称。检查相关的 Spring bean 条件,并验证用户提供的 interceptor 可以在不启用 bean 定义覆盖的情况下替换默认 interceptor。

由索引模型根据 Issue 内容生成。

描述

Issue Description

Type: bug report

Describe what happened

1.8.8 版本中将资源名前添加http方法的逻辑,拆分到SentinelWebPrefixInterceptor类中。但未添加可替换的注解,导致在不开启allow-bean-definition-overriding的情况下,无法替换为SentinelWebPrefixInterceptor

@Bean
@ConditionalOnProperty(name = "spring.cloud.sentinel.filter.enabled",
	matchIfMissing = true)
public SentinelWebMvcConfigurer sentinelWebMvcConfigurer() {
return new SentinelWebMvcConfigurer();
}
Describe what you expected to happen

添加@ConditionalOnMissingBean注解。

How to reproduce it (as minimally and precisely as possible)
Tell us your environment
Anything else we need to know?
主要语言
Java
星标
23.1k
派生
8.1k
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

alibaba/Sentinel 的其他 Issue

查看 alibaba/Sentinel 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。