Class TaskConflictHandler
java.lang.Object
fr.tiogars.chat.domains.task.controllers.TaskConflictHandler
@RestControllerAdvice(basePackageClasses=TaskCreateController.class)
public class TaskConflictHandler
extends Object
Reports active-code and concurrent-write conflicts without hiding other database errors.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void> concurrentWrite(org.springframework.dao.OptimisticLockingFailureException exception) org.springframework.http.ResponseEntity<Void> duplicateActiveCode(org.springframework.dao.DataIntegrityViolationException exception)
-
Constructor Details
-
TaskConflictHandler
public TaskConflictHandler()
-
-
Method Details
-
concurrentWrite
@ExceptionHandler(org.springframework.dao.OptimisticLockingFailureException.class) public org.springframework.http.ResponseEntity<Void> concurrentWrite(org.springframework.dao.OptimisticLockingFailureException exception) -
duplicateActiveCode
@ExceptionHandler(org.springframework.dao.DataIntegrityViolationException.class) public org.springframework.http.ResponseEntity<Void> duplicateActiveCode(org.springframework.dao.DataIntegrityViolationException exception)
-