Skip to content

Conversation

gengu
Copy link
Owner

@gengu gengu commented Apr 11, 2022

RT

*/
@Override
public boolean execute() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

删除第一行评论

@Override
public boolean execute() {

BoundValueOperations<String, String> boundValueOps = redisTemplate.boundValueOps(route);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

删除第2行评论

public boolean execute() {

BoundValueOperations<String, String> boundValueOps = redisTemplate.boundValueOps(route);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

删除第3行评论


BoundValueOperations<String, String> boundValueOps = redisTemplate.boundValueOps(route);

if(boundValueOps.setIfAbsent("1")){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

删除第4行评论

BoundValueOperations<String, String> boundValueOps = redisTemplate.boundValueOps(route);

if(boundValueOps.setIfAbsent("1")){
boundValueOps.expire(1000, TimeUnit.MILLISECONDS);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

删除第5行评论


if(boundValueOps.setIfAbsent("1")){
boundValueOps.expire(1000, TimeUnit.MILLISECONDS);
System.out.println(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

删除第6行评论

if(boundValueOps.setIfAbsent("1")){
boundValueOps.expire(1000, TimeUnit.MILLISECONDS);
System.out.println(
"add value to redis,key=" + route + ",second=" + (System.currentTimeMillis() / 1000));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

删除第7行评论


@Bean
public DistributedLimiter distributedLimiter(){
return new DistributedLimiter(stringRedisTemplate) ;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

删除行上面是非Diff区域

this.route = route ;
this.limit = limit ;
this.route = route;
this.limit = limit;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

连续4个变更行


public DistributedLimiter(
RedisTemplate<String, String> redisTemplate) {
public DistributedLimiter(RedisTemplate redisTemplate) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

连续3个变更行

@reviewpad reviewpad bot mentioned this pull request May 8, 2023
9 tasks
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

Successfully merging this pull request may close these issues.

3 participants