BeanUtils.populate()空字符串转换日期的解决办法

我们在使用beanutils.populate()封装参数时,如果封装的字符串是空,在转换成date时会出现以上异常,此时可以在工具类中添加静态代码块即可解决:注意导入beanutils 包 import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.ConvertUtils; import
相关文章
相关标签/搜索