Bootstrap

String类型(多个使用,分割)转换为List

    public static List<Long>  formattingString( String   ss){
        if(StringUtils.isBlank(ss)){ return null;};
        List<Long>   longs=new ArrayList<>();
        String[] sourceStrArray = ss.split(",");
        for (int i = 0; i < sourceStrArray.length; i++) {
            longs.add( Long.valueOf( sourceStrArray[i]));}
         return longs;
    }

 

;