爲什麼此代碼打印0?無法找到班級註釋
@Table(name = "source")
public class SourceDetails implements DatabaseEntity{
public static void main(String[] args) {
System.out.println(SourceDetails.class.getAnnotations().length);
}
...
}
爲什麼此代碼打印0?無法找到班級註釋
@Table(name = "source")
public class SourceDetails implements DatabaseEntity{
public static void main(String[] args) {
System.out.println(SourceDetails.class.getAnnotations().length);
}
...
}
它是javax.persistence.Table?或者你的@Table? – Bozho 2009-12-07 09:59:21