spring-projects/spring-data-rest — pull request #126 by nickweedon (2014-01-14 08:54:51+00:00)
Title: Datarest 216

DATAREST-216 - Removed CrudRepositoryInvoker#invokeFindOne(Serializable id) method override as this will cause the findOne(Serializable id) method to be called instead of any existing, more specific methods. This in turn bypasses any AOP proxying of the more specific method.

This possibly only occurs when JDK proxying is used and not CGLib.

Included is the fix implementation and unit test. The unit test effectively proves that there is an existing problem.

The unit test uses Spring method based security on the findOne method.

I first attempted to reproduce this issue using AspectJ AOP, specifically using a @Before advice on the method. This seemed to work properly before this fix was applied. This is what makes me suspect that perhaps this relates only to JDK proxying but this is really only a guess.