|
@@ -1,5 +1,6 @@
|
|
|
package org.dromara.base.config;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.dromara.base.annotation.FormatIgnore;
|
|
|
import org.dromara.common.core.domain.R;
|
|
@@ -38,6 +39,9 @@ public class ResponseAdvice implements ResponseBodyAdvice<Object>, ErrorControll
|
|
|
if (body instanceof R || body instanceof TableDataInfo) {
|
|
|
return body;
|
|
|
}
|
|
|
+ if (body instanceof String) {
|
|
|
+ return JSONObject.toJSONString(R.ok("操作成功", body));
|
|
|
+ }
|
|
|
return R.ok("操作成功", body);
|
|
|
}
|
|
|
|