diff --git a/src/main/java/xyz/zhouxy/plusone/commons/annotation/Overridable.java b/src/main/java/xyz/zhouxy/plusone/commons/annotation/Overridable.java index 78aa281..a0a3c1b 100644 --- a/src/main/java/xyz/zhouxy/plusone/commons/annotation/Overridable.java +++ b/src/main/java/xyz/zhouxy/plusone/commons/annotation/Overridable.java @@ -16,6 +16,11 @@ package xyz.zhouxy.plusone.commons.annotation; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + /** * 标识该方法是可覆写的。 *

该注解用于提醒、强调父类虽然有默认实现,但子类可以根据自己的需要覆写。

@@ -23,5 +28,7 @@ package xyz.zhouxy.plusone.commons.annotation; * @author ZhouXY * @since 0.1.0 */ +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.SOURCE) public @interface Overridable { } diff --git a/src/main/java/xyz/zhouxy/plusone/commons/annotation/ValueObject.java b/src/main/java/xyz/zhouxy/plusone/commons/annotation/ValueObject.java index 86becf2..ab21144 100644 --- a/src/main/java/xyz/zhouxy/plusone/commons/annotation/ValueObject.java +++ b/src/main/java/xyz/zhouxy/plusone/commons/annotation/ValueObject.java @@ -16,11 +16,18 @@ package xyz.zhouxy.plusone.commons.annotation; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + /** * ValueObject - 值对象 * * @author ZhouXY * @since 0.1.0 */ +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.RUNTIME) public @interface ValueObject { }