自定义注释,不使用反射

时间:2016-09-26 09:20:48

标签: spring maven annotations

这里是我的自定义注释

@interface IcustomAnnotation{
String getCode();
}

class myClass{
@IcustomAnnotation(getCode="SomeData")
public String setID(String ID){
return ID
}
}
<{1>}中的

,想要使用setID()getCode应该包含由getCode生成的随机数据

SecureRandom

怎么办?

0 个答案:

没有答案