批量删除中String[]转成Integer[]


1.导入依赖
<!-- https://mvnrepository.com/artifact/commons-beanutils/commons-beanutils -->
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.9.4</version>
</dependency>


2.具体方法
String[] empnoarrays = request.getParameterValues("empnoarray");

//将string[]强转成Integer[]
Integer[] ids = (Integer[])ConvertUtils.convert(empnoarrays, Integer.class);
Integer delete = empService.delete(ids);
上一篇:Python反射机制的解释


下一篇:java map 配置文件