`

方便调试开发的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();
    }
分享到:
评论

相关推荐

    HttpClient以及获取页面内容应用

    System.out.println("Response content: " + EntityUtils.toString(entity, "UTF-8")); System.out.println("--------------------------------------"); } } finally { response.close(); ...

Global site tag (gtag.js) - Google Analytics