Fortify抱怨龙目岛注释@Data

时间:2018-10-31 08:13:42

标签: lombok fortify

强化:分配:不安全的活页夹配置

@Data
public class OrderRequest implements Serializable{

    private static final long serialVersionUID = 1L;
    private Header header;
    private List<OrderVO> orderList;

}

@数据lombok注释报告了强化中的质量分配错误。

如何解决?有指针吗?

1 个答案:

答案 0 :(得分:1)

这有助于解决强化的龙目岛问题

   /**
     * This is fix fortify issues as recommendation to use binder to
     * allow / disallow fields
     * @param binder
     */
    @InitBinder
    public void populateRequest(WebDataBinder binder) {
        binder.setDisallowedFields(new String[]{});
    }