`@Mapper
interface GoodsDao{

@sle("select * from tb_goods")
Object findGoods();

}`
如何判断接口上是否有注解
System.out.println( GoodsDao.class.isAnnotationPresent(Mapper.class));
获取方法上的注解中sql
`sle desc0 = GoodsDao.class.getMethod("findGoods").getAnnotation(sle.class);
System.out.println(desc0.value());`


chalehc
1 声望0 粉丝

« 上一篇
springboot测试
下一篇 »
ajax