The Chronon plugin, which is available for free with IntelliJ IDEA 13, can do this for you. It has limitations, though; chiefly, if your application runs outside of the IDE itself (like a Tomcat or Jetty server), the free version won't be usable with your setup.