I am trying to recreate the functionality of Spring Data REST controller in a custom REST controller class so that I can get HAL formatted JSON and be able to use projections. N