简体   繁体   中英

missing org.apache.commons.collections.CollectionUtils

I import commons-lang3 as following:

<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-lang3</artifactId>
    <version>3.4</version>
</dependency>

But I can not found sub package collections in package org.apache.commons.lang3

在此处输入图片说明

You will not find it in this jar. Maybe you are looking for the commons-collections artifact:

 <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-collections4</artifactId>
        <version>4.4</version>
   </dependency>

or

<dependency>
    <groupId>commons-collections</groupId>
    <artifactId>commons-collections</artifactId>
    <version>3.2.2</version>
</dependency>

In both of them, you will find the class CollectionUtils. But, in your case, I think the version 3.2.2 will fit better.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM