使用方法

1、引入jar包到工程

2、

@RunWith(SpringJUnit4ClassRunner.class)     //表示继承了SpringJUnit4ClassRunner类  
@ContextConfiguration(locations = {"classpath:spring-mybatis.xml"})  
public class TestJava {
	
	@Test  
    public void test1() throws Exception {
		RestmapUtil.getRestMap(new CourseAndStudent().getClass());
	}
}

使用单元测试,也可以用main方法调用工具类

CourseAndStudent是要被转换的bean类

*CourseAndStudent要有set和get方法

附件jar工具包下载

最后修改于 2019-06-05 16:04:29
如果觉得我的文章对你有用,请随意赞赏
扫一扫支付
上一篇