ReflectionToStringBuilder使用

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>



OperateLog log = service.get(2);
System.out.println(ReflectionToStringBuilder.toString(log));

 

输出:

bean.Person@58cf323d[name=Rollen,age=20]
bean.Person@170e3e70[name=Rollen2,age=30]

 

posted @ 2016-04-10 10:22    阅读(1842)  评论(0编辑  收藏  举报