用于输出object对象中的属性值
import java.lang.reflect.InvocationTargetException;import java.util.Map;import org.apache.commons.beanutils.BeanUtils;public class StringUtils {public static String toString(Object bean) {if (bean == null) {return "";}try {Map describe = BeanUtils.describe(bean);return describe.toString();} catch (IllegalAccessException e1) {} catch (InvocationTargetException e1) {} catch (NoSuchMethodException e1) {}return bean.toString();}}