If I annotate my event handler methods with a Pre/Post annotation, it is added to the handlerMethods(…) twice, and as a consequence invoked twice.
I suppose this is not the intended behavior.
@Slf4j@RepositoryEventHandler(User.class)
publicclassUserEventHandler {
@HandleBeforeCreate@PreAuthorize("hasRole('ROLE_ADMIN'))
publicvoidhandleNewUser(UsernewUser) {
log.debug("Handle user {}", newUser);
// processing here
}
}
The two handlers in the map (package names removed) are
Endre Czirbesz opened DATAREST-582 and commented
If I annotate my event handler methods with a Pre/Post annotation, it is added to the
handlerMethods(…)
twice, and as a consequence invoked twice.I suppose this is not the intended behavior.
The two handlers in the map (package names removed) are
and
The
EnhancerBySpringCGLIB
version is not in the map when@PreAuthorize
is removedAffects: 2.3 GA (Fowler)
Backported to: 2.3.1 (Fowler SR1)
The text was updated successfully, but these errors were encountered: