/************************************************************************
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
************************************************************************/
package core.plugin.spring;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.context.request.WebRequest;
import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler;
import common.exception.http.BadRequestException;
import common.exception.http.ConflictException;
import common.exception.http.ExpectationFailedException;
import common.exception.http.ForbiddenException;
import common.exception.http.GoneException;
import common.exception.http.LengthRequiredException;
import common.exception.http.MethodNotAllowedException;
import common.exception.http.NotAcceptableException;
import common.exception.http.NotFoundException;
import common.exception.http.PaymentRequiredException;
import common.exception.http.PreconditionFailedException;
import common.exception.http.ProxyAuthenticationRequiredException;
import common.exception.http.RequestEntityTooLargeException;
import common.exception.http.RequestTimeoutException;
import common.exception.http.RequestURITooLongException;
import common.exception.http.RequestedRangeNotSatisfiableException;
import common.exception.http.UnauthorizedException;
import common.exception.http.UnsupportedMediaTypeException;
/**
*
* 全局异常处理器
*
* @author CSJ
*/
@ControllerAdvice
public class GlobalExceptionHandler extends ResponseEntityExceptionHandler {
@Override
protected ResponseEntity