apolloconfig / apollo-use-cases

Show various usage scenarios and sample codes of the Apollo configuration center, welcome to share more configuration use cases in your daily work!
Apache License 2.0
944 stars 401 forks source link

针对网关限流和apollo结合实现动态控制相关用例 #28

Closed Jiiiiiin closed 5 years ago

Jiiiiiin commented 5 years ago

针对spring-cloud-zuul-ratelimit插件的用例:

针对zuul网关限流插件 marcosbarbero/spring-cloud-zuul-ratelimit的限流配置,这边做了一下测试,可以被动态重新加载,组件在这里

@nobodyiam 是否有添加的意义,麻烦看看 呵呵

nobodyiam commented 5 years ago

可以的,欢迎PR!

另外有个小建议,配置监听的时候可以使用interestedKeyPrefixes配置,如@ApolloConfigChangeListener(interestedKeyPrefixes = RateLimitProperties.PREFIX),会让代码更简单

Jiiiiiin commented 5 years ago

好的 谢谢鼓励

Jiiiiiin commented 5 years ago

@nobodyiam 已经提交,请大佬帮忙看看 https://github.com/ctripcorp/apollo-use-cases/pull/29

Jiiiiiin commented 5 years ago

@nobodyiam 谢谢 学习到了很多pr规范~~