代码:

import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
 * 自定义属性注解
 * @author 【】
 *
 */
@Target({ ElementType.FIELD, ElementType.TYPE })
@Retention(RUNTIME)
public @interface Comment {
	// 定义注解中的属性,默认值为空字符串
	String value() default "";
}

 

相关文章:

  • 2021-05-24
  • 2020-02-23
  • 2020-06-01
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-17
  • 2022-01-07
相关资源
相似解决方案