导入maven依赖
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.8.3</version>
</dependency>
//String数组
String[] split = replace.split(",");
//将String数组转成Integer数组
Integer[] aftIdArray = (Integer[]) ConvertUtils.convert(split, Integer.class);
搞定--完美
//获取文件的父目录地址
File f=new File("C:\\SDK_LOG\\parnoc");
System.out.println(f.getParentFile());
输出:C:\SDK_LOG
获取当前项目的根目录
File file =new File(".");
String rootpath=file.getCanonicalPath()
System.out.println(rootpath);