src/main/java/com/jmsoftware/datastructuresandalgorithms/common/bean/ResponseBodyBean.java
/**
     * <p>Highly customizable response. Status might be any HttpStatus&#39; code value.</p>
     * <p><strong>ATTENTION:</strong></p>
     * <p>This method CANNOT be used by controller or service or other class, only provided for Exception controller
     * .</p>
     *
     * @param <ResponseBodyDataType> the response body data type
     * @param status                 status code
     * @param message                message to be responded
     * @param data                   data to be responded
     * @return response body for ExceptionControllerAdvice
     */
Highly customizable response. Status might be any HttpStatus' code value.
ATTENTION:
This method CANNOT be used by controller or service or other class, only provided for Exception controller
.


Highly customizable response . Status might be any HttpStatus ' code value . ATTENTION : This method CANNOT be used by controller or service or other class only provided for Exception controller .
public static <ResponseBodyDataType> ResponseBodyBean<ResponseBodyDataType> ofStatus(@NonNull final Integer status,
                                                                                                                        @NonNull final String message,
                                                                                                                        final ResponseBodyDataType data) {
        return ResponseBodyBean.<ResponseBodyDataType>builder()
                .timestamp(new Date())
                .status(status)
                .message(message)
                .data(data)
                .build();
    }
public static < ResponseBodyDataType > ResponseBodyBean < ResponseBodyDataType > ofStatus ( @ NonNull final Integer status , @ NonNull final String message , final ResponseBodyDataType data ) { return ResponseBodyBean . < ResponseBodyDataType > builder ( ) . timestamp ( new Date ( ) ) . status ( status ) . message ( message ) . data ( data ) . build ( ) ; }
<p>Highly customizable response.
<p > Highly customizable response .