title: Is there an equivalent of a "beforeHandler" for spring 4?
body: <p>I have a controller with a requestmapping..</p>
  
  <pre><code>@Controller
  public class TestController {
  
      private static final String template = "Hello there, %s!";
      private final AtomicLong counter = new AtomicLong();
  
      @RequestMapping("/hello")
      public @ResponseBody String hello() {
  
                        return "Hello";
      }
  }
  </code></pre>
  
  <p>How can I make it such that everytime a user goes to a RequestMapping, or whichever url, some other method is called to println to the console the URL the user is at before it actually enters the method "hello"? </p>
  
  <p>I would like to use this method to ensure users have proper credentials in the future. I see there are @PreAuthorize annotation, but there doesnt seem to be a method associated with it that I can write my own logic, i.e. do a simple println to the console with the current URL the user is at.</p>