Changing field to constructor injection for rest resource classes