修正安全管理器限制的本地调用

This commit is contained in:
thinkgem
2025-03-04 09:50:57 +08:00
parent 75e6ccf888
commit c14f464c3f

View File

@@ -7,8 +7,8 @@ var message = @ObjectUtils.toString(@request.getAttribute('message'));
if (isBlank(message)){
var ex = @ExceptionUtils.getThrowable(request);
if (ex != null){
if(@StringUtils.startsWith(@ex.getMessage(), 'msg:')){
message = @StringUtils.replace(@ex.getMessage(), 'msg:', '');
if(@StringUtils.startsWith(ex.message, 'msg:')){
message = @StringUtils.replace(ex.message, 'msg:', '');
}else if (type.fullName(ex) == 'org.springframework.validation.BindException'
|| type.fullName(ex) == 'org.springframework.web.bind.MethodArgumentNotValidException'){
for (var e in ex.globalErrors){