The error message "Cannot resolve method 'setResult(boolean)'" indicates that the setResult(boolean) method does not exist in the ResultInfo class.

To fix this issue, you can add a setResult(boolean) method to the ResultInfo class. Here's an example of how you can add this method:

public ResultInfo setResult(boolean result) {
    this.result = result;
    return this;
}

With this method, you can chain it together with the setData(Object) method like this:

return new ResultInfo()
        .setData(examineRelationConstraintVO)
        .setResult(true);

This will set the result to true and return the ResultInfo object

Datapublic class ResultInfo 结果标识成功或失败 private boolean result; 信息说明 private String info; 数据正文 private Object data; 默认无参构造方法 public R

原文地址: https://www.cveoy.top/t/topic/iBEx 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录