Closed
Description
This issue is similar to #13132
But for repository methods going through proxies.
Example code :
@NoRepositoryBean
@RepositoryRestResource
public interface DefaultCrudRepository<T, K> extends JpaRepository<T, K> {
@PreAuthorize(SUPPORT_ROLE_RULE_FOR_CRUD)
@Override
@RestResource
@NonNull
<S extends T> S save(@NonNull S entity);
}
Then in AuthorizationAnnotationUtils#findUniqueAnnotation
, the mergedAnnotations
contains 2 PreAuthorize :
Which results in an AnnotationConfigurationException