In the file
src/main/java/com/springboot/ratelimiter/user/service/impl/RateLimiterServiceImpl.java
Make the part of the code that reads and updates the value on Redis synchronized.
If not, many threads could access at the same time and read the same value, or update an old value that doesn't reflect the current situation.
In the file
src/main/java/com/springboot/ratelimiter/user/service/impl/RateLimiterServiceImpl.java
Make the part of the code that reads and updates the value on Redis synchronized.
If not, many threads could access at the same time and read the same value, or update an old value that doesn't reflect the current situation.