@Entity没有标记@Documented注释。
@Target(TYPE)
@Retention(RUNTIME)
public @interface Entity {
如果用@ javax.Inject注释尝试相反,你应该看到的JavaDoc,因为它打上@Documented。
@Target({ METHOD, CONSTRUCTOR, FIELD })
@Retention(RUNTIME)
@Documented
public @interface Inject {}
的@Documented注解用的JavaDoc:
/**
* Indicates that annotations with a type are to be documented by javadoc
* and similar tools by default. This type should be used to annotate the
* declarations of types whose annotations affect the use of annotated
* elements by their clients. If a type declaration is annotated with
* Documented, its annotations become part of the public API
* of the annotated elements.
*
* @author Joshua Bloch
* @version 1.6, 11/17/05
* @since 1.5
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.ANNOTATION_TYPE)
public @interface Documented {
}
一个解决办法是导入Java源代替的JavaDoc。然后它会按照你的预期工作。
你弄明白了吗? – Espen 2010-04-26 13:33:01
我终于做到了。进入preferences-> maven并检查工件源和工件javadoc。诀窍了。谢谢! – HDave 2010-04-29 04:27:39