-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement
Milestone
Description
@ControllerAdvice
public class GlobalExceptionHandler {
@ExceptionHandler(OptimisticLockingFailureException.class)
@ResponseStatus(code = CONFLICT, reason = "optimistic.locking.failure")
public void handleConflict() {
}
}If I move @ResponseStatus to Exception, It works fine.
Lines 147 to 149 in b595dc1
| if (StringUtils.hasText(reason)) { | |
| response.sendError(status.value(), reason); | |
| } |
should keep consistency with
Lines 157 to 159 in b595dc1
| String resolvedReason = (this.messageSource != null ? | |
| this.messageSource.getMessage(reason, null, reason, LocaleContextHolder.getLocale()) : | |
| reason); |
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement