Description
Describe the bug
When annotating a method that causes a synthetic method to be created (for example when overriding Spring Datas ListCrudRepository#findAllById
which in turn overrides CrudRepository#findAllById
) both the original and the synthetic method will contain this annotation when checking at runtime. This leads to a AnnotationConfigurationException
being thrown when trying to call the overridden method although the annotation is only present once in the source code
To Reproduce
Check out https://github.com/f-cramer/spring-security-synthetic-methods an call http://localhost:8080/books
with username admin
and password abc123
.
Expected behavior
Synthetic methods should be ignored when validating the uniqueness of security annotations