有时候查询出来的数据封装在list中有重复,为了利用set自动去重功能,需要把list放到set中,可使用 CollectionUtils 工具类,如下
import java.util.List;
import java.util.Set;
import org.apache.commons.collections.CollectionUtils;
import org.junit.jupiter.api.Test;
import com.google.common.collect.
有时候查询出来的数据封装在list中有重复,为了利用set自动去重功能,需要把list放到set中,可使用 CollectionUtils 工具类,如下
import java.util.List;
import java.util.Set;
import org.apache.commons.collections.CollectionUtils;
import org.junit.jupiter.api.Test;
import com.google.common.collect.