Example usage for org.springframework.dao PessimisticLockingFailureException getMessage

List of usage examples for org.springframework.dao PessimisticLockingFailureException getMessage

Introduction

In this page you can find the example usage for org.springframework.dao PessimisticLockingFailureException getMessage.

Prototype

@Override
@Nullable
public String getMessage() 

Source Link

Document

Return the detail message, including the message from the nested exception if there is one.

Usage

From source file:org.terasoluna.gfw.functionaltest.app.exceptionhandling.ExceptionHandlingController.java

@ExceptionHandler(PessimisticLockingFailureException.class)
@ResponseStatus(HttpStatus.CONFLICT)// w  w  w. j av  a 2  s.  co m
public ModelAndView handleException(PessimisticLockingFailureException e) {
    ExtendedModelMap modelMap = new ExtendedModelMap();

    modelMap.addAttribute("exceptionMessage", e.getMessage());
    return new ModelAndView("exceptionhandling/exceptionHandler", modelMap);
}