How to create a REST Resource and also use dependency injection in it's class