@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