|
@@ -0,0 +1,31 @@
|
|
|
+/*
|
|
|
+ * 爱组搭,低代码组件化开发平台
|
|
|
+ * ------------------------------------------
|
|
|
+ * 受知识产权保护,请勿删除版权申明,开发平台不允许做非法网站,后果自负
|
|
|
+ */
|
|
|
+package com.aizuda.boot.config;
|
|
|
+
|
|
|
+import com.aizuda.core.api.ApiResult;
|
|
|
+import com.flowlong.bpm.engine.exception.FlowLongException;
|
|
|
+import org.springframework.http.HttpStatus;
|
|
|
+import org.springframework.web.bind.annotation.ExceptionHandler;
|
|
|
+import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
+import org.springframework.web.bind.annotation.ResponseStatus;
|
|
|
+import org.springframework.web.bind.annotation.RestControllerAdvice;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 自定义异常统一提示
|
|
|
+ */
|
|
|
+@RestControllerAdvice
|
|
|
+public class BootException {
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 工作流引擎异常提示
|
|
|
+ */
|
|
|
+ @ExceptionHandler(FlowLongException.class)
|
|
|
+ @ResponseStatus(HttpStatus.OK)
|
|
|
+ @ResponseBody
|
|
|
+ public ApiResult<String> handleBindException(FlowLongException e) {
|
|
|
+ return ApiResult.failed(e.getMessage());
|
|
|
+ }
|
|
|
+}
|