injecting the rest template