方便调试开发的entity的toString方法

@SuppressWarnings("unchecked")
    @Override
    public String toString() {
        StringBuffer buf = new StringBuffer();
        Map map = null;
        try {
            map = BeanUtils.describe(this);
        } catch (Exception e) {
            buf.append("BeanUtils describe bean occur exception:" + e.getMessage());
            return buf.toString();
        }
        return map.toString();
    }

你可能感兴趣的:(java,bean)