update 优化 去除返回前端的异常信息里包含html标签问题
This commit is contained in:
parent
1c3d594947
commit
e33f76d710
@ -3,6 +3,7 @@ package org.dromara.system.listener;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.crypto.digest.BCrypt;
|
||||
import cn.hutool.http.HtmlUtil;
|
||||
import com.alibaba.excel.context.AnalysisContext;
|
||||
import com.alibaba.excel.event.AnalysisEventListener;
|
||||
import jakarta.validation.ConstraintViolation;
|
||||
@ -82,7 +83,7 @@ public class SysUserImportListener extends AnalysisEventListener<SysUserImportVo
|
||||
}
|
||||
} catch (Exception e) {
|
||||
failureNum++;
|
||||
String msg = "<br/>" + failureNum + "、账号 " + userVo.getUserName() + " 导入失败:";
|
||||
String msg = "<br/>" + failureNum + "、账号 " + HtmlUtil.cleanHtmlTag(userVo.getUserName()) + " 导入失败:";
|
||||
String message = e.getMessage();
|
||||
if (e instanceof ConstraintViolationException cvException) {
|
||||
message = StreamUtils.join(cvException.getConstraintViolations(), ConstraintViolation::getMessage, ", ");
|
||||
|
Loading…
x
Reference in New Issue
Block a user