摘要: 上一篇了解了自定义注解的使用,不过里面的例子没有多大使用价值,这一回来个有用点的Demo。目标:将实体bean保存到数据库先来定义一个实体注解import java.lang.annotation.ElementType;import java.lang.annotation.Retention;import java.lang.annotation.RetentionPolicy;import java.lang.annotation.Target;@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME)public @in. 阅读全文
posted @ 2013-07-13 23:09 yejg1212 阅读(1569) 评论(1) 推荐(1) 编辑
摘要: 前面了解了注解的基本内容,这次来看一下自定义注解。自定义注解其实很简单,直接上代码:import java.lang.annotation.Documented;import java.lang.annotation.Inherited;import java.lang.annotation.Retention;import java.lang.annotation.Target;import java.lang.annotation.ElementType;import java.lang.annotation.RetentionPolicy;@Target(ElementType.METH 阅读全文
posted @ 2013-07-13 22:28 yejg1212 阅读(1045) 评论(0) 推荐(0) 编辑