Reducing boilerplate in JAX-RS resources