我已经在pom.xml中为我的spring引导项目导入了。
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>4.4</version>在模型文件中也导入了下面的包。
import org.apache.commons.collections4.FactoryUtils;下面是我试图使用Apache中的LazyList的代码。
private List<Children> childrens = LazyList.decorate(new ArrayList<Children>(),FactoryUtils.instantiateFactory(Children.class));我从ApacheCommons导入了LazyList,但是STS无法从LazyList中识别from ()。
请查找以下错误。
The method decorate(ArrayList<Children>, FactoryUtils.instantiateFactory(Children.class)) is undefined for the type LazyList需要快速的帮助,有人能帮我吗?
发布于 2021-03-20 22:01:31
显然,API在第3版和第4版之间发生了很大变化。
static <E> LazyList<E> lazyList(List<E> list, Factory<? extends E> factory)而不是。
https://stackoverflow.com/questions/66726771
复制相似问题