Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sentinel dashboard热点规则中是否支持@requestbody修饰的类其中的某一个参数 #3503

Open
lx687 opened this issue Feb 27, 2025 · 8 comments

Comments

@lx687
Copy link

lx687 commented Feb 27, 2025

No description provided.

@gd-three
Copy link

@gd-three
Copy link

Image

@gd-three
Copy link

也可以自行扩展并注册了自己实现的 SlotChainBuilder,并希望使用热点参数限流功能,则可以在 chain 里面合适的地方插入 ParamFlowSlot

@lx687
Copy link
Author

lx687 commented Mar 3, 2025

也可以自行扩展并注册了自己实现的 SlotChainBuilder,并希望使用热点参数限流功能,则可以在 chain 里面合适的地方插入 ParamFlowSlot

我这边是springboot项目,这种方式也可以嘛,因为主要是通过@SentinelResource注解配置限流的

@lx687
Copy link
Author

lx687 commented Mar 3, 2025

https://sentinelguard.io/zh-cn/docs/parameter-flow-control.html 这里有说明 示例可参见 sentinel-demo-parameter-flow-control
这个示例里边是通过手写限流代码的方式,应该会与注解形式冲突吧

@gd-three
Copy link

gd-three commented Mar 4, 2025

也可以自行扩展并注册了自己实现的 SlotChainBuilder,并希望使用热点参数限流功能,则可以在 chain 里面合适的地方插入 ParamFlowSlot

我这边是springboot项目,这种方式也可以嘛,因为主要是通过@SentinelResource注解配置限流的

都可以啊,很灵活的,自定义SlotChainBuilder的话复杂些。其实你引入parameter依赖,入参实体实现参数接口指定哪个属性是要限流的就可以了

@gd-three
Copy link

gd-three commented Mar 4, 2025

https://sentinelguard.io/zh-cn/docs/parameter-flow-control.html 这里有说明 示例可参见 sentinel-demo-parameter-flow-control
这个示例里边是通过手写限流代码的方式,应该会与注解形式冲突吧

这里只是举例让你明白流程,具体用那个形式来限流根据你自己的情况来

@gd-three
Copy link

gd-three commented Mar 4, 2025

还不懂 加我14795652383

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants