title: Spring RateLimiter for GET/POST requests
body: <p>I found <a href="https://google.github.io/guava/releases/21.0/api/docs/index.html?com/google/common/util/concurrent/RateLimiter.html" rel="nofollow noreferrer">Guava RateLimiter</a> for implementing limitation for GET/Post requests. I called the class in controller and called the object for some get classes. But nothing happens. I can still request get methods multiple times in a second.</p>
  
  <pre><code>@Controller
  public class Controller {
  
      final RateLimiter rateLimiter = RateLimiter.create(1.0);
  
  @RequestMapping(value = "/user/{customId}", method = RequestMethod.GET, headers = "Accept=application/json")
      @ResponseBody
      public List&lt;User&gt; showUser(@PathVariable("customId") String customId) {
          rateLimiter.acquire();
          return services.findUserByCustomId(customId);
      }
  
  }
  </code></pre>
  
  <p>Should I do something more, or is there any other solution for rate limiting? </p>