标签:cas title int 知识库 try catch run this ble
本例子旨在使用自定义注解为实体打上标记,为自动生成 sql 提供依据,模拟 hibernate 的注解,至于注解的原理自己搜吧
1.定义 Table 注解
2.定义 Column 注解
3.定义使用注解的实体
4.测试注解
测试结果:
select * from tb_test where 1=1 and _id=123 and username=34
select * from tb_test where 1=1 and _id=123 and username like ‘%test1%‘
select * from tb_test where 1=1 and username in (test1,test2,test3,test4)
标签:cas title int 知识库 try catch run this ble
原文地址:http://www.cnblogs.com/keyi/p/6797044.html