-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.4在线表单导入配置java增强,不会抛出异常,即使导入不成功也不会。 #2070
Comments
收录 |
不行的。不管抛出什么Exception,页面上都是提示导入成功,数据没进去。
@component("financialIncomeImport")
public class FinancialIncomeImport implements CgformEnhanceJavaInter {
@OverRide
public int execute
(String s, Map<String, Object> map) throws BusinessException {
//默认返回1 走新增逻辑
return 1;
}
@OverRide
public int execute(String s, JSONObject jsonObject) throws BusinessException {
// try {
System.out.println(jsonObject.toJSONString());
if(1==1) {
throw new BusinessException("测试报错");
}
// }catch (Exception e){
// e.printStackTrace();
// }
//默认返回1 走新增逻辑
return 1;
}
}
…------------------ 原始邮件 ------------------
发件人: "zhangdaiscott/jeecg-boot" <notifications@github.com>;
发送时间: 2020年12月7日(星期一) 晚上7:19
收件人: "zhangdaiscott/jeecg-boot"<jeecg-boot@noreply.github.com>;
抄送: "鱼摆摆缺水"<642080176@qq.com>;"Author"<author@noreply.github.com>;
主题: Re: [zhangdaiscott/jeecg-boot] 2.4在线表单导入配置java增强,不会抛出异常,即使导入不成功也不会。 (#2070)
目前这里处理了 org.jeecg.modules.online.config.exception.BusinessException
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
处理完成,下个版本发布 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
版本号:
2.4
问题描述:
2.4版本,在线表单开发中,对某一表单的导入按钮添加了java增强,在实现代码中手动抛出异常,前端仍然提示导入成功,数据没有插入进去。后端有捕获到异常。
截图&代码:
代码如下:
import com.alibaba.fastjson.JSONObject;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.modules.online.cgform.enhance.CgformEnhanceJavaInter;
import org.jeecg.modules.online.config.exception.BusinessException;
import org.springframework.stereotype.Component;
import java.util.Map;
/**
财务收入导入处理
*/
@component("financialIncomeImport")
public class FinancialIncomeImport implements CgformEnhanceJavaInter {
@OverRide
public int execute(String s, Map<String, Object> map) throws BusinessException {
}
@OverRide
public int execute(String s, JSONObject jsonObject) throws BusinessException {
// try {
System.out.println(jsonObject.toJSONString());
if(1==1) {
throw new JeecgBootException("测试报错");
}
// }catch (Exception e){
// e.printStackTrace();
// }
//默认返回1 走新增逻辑
return 1;
}
}
友情提示: 未按格式要求发帖,会直接删掉。
The text was updated successfully, but these errors were encountered: