Consolidate use of RequestContextHolder
Several places are now calling either currentRequestAttributes() or getRequestAttributes() from RequestContextHolder to get information about the current request. It is unclear which one is the correct one, and perhaps the code would work better with the other one?
One example is the fix for merge request !335 (merged), where the use of getRequestAttributes() in HateoasHandler.java did not work, so a workaround using currentRequestAttributes() was added in HateoasSerializer to make sure the generated hrefs had proper URL content.
Perhaps there are other cases too? Should the use be standardized, or consolidated into a common method?