手把手教你做网站做网站设计的都转行干啥了

news/2025/9/24 17:26:23/文章来源:
手把手教你做网站,做网站设计的都转行干啥了,怎么创建一个空壳公司,电子商务静态网页设计一、前言 spring为开发人员提供了两个搜索注解的工具类#xff0c;分别是AnnotatedElementUtils和AnnotationUtils。在使用的时候#xff0c;总是傻傻分不清#xff0c;什么情况下使用哪一个。于是我做了如下的整理和总结。 二、AnnotationUtils官方解释 功能 用于处理注解分别是AnnotatedElementUtils和AnnotationUtils。在使用的时候总是傻傻分不清什么情况下使用哪一个。于是我做了如下的整理和总结。 二、AnnotationUtils官方解释   功能   用于处理注解处理元注解桥接方法编译器为通用声明生成以及超级方法用于可选注解继承的常规实用程序方法。请注意JDK的内省工具本身并不提供此类的大多数功能。作为运行时保留注解的一般规则例如用于事务控制授权或服务公开始终在此类上使用查找方法例如findAnnotationMethodClassgetAnnotationMethodClass和getAnnotations方法而不是JDK中的普通注解查找方法。您仍然可以在给定类级别的get查找getAnnotationMethodClass和给定方法的整个继承层次结构中的查找查找findAnnotationMethodClass之间明确选择。   术语   直接呈现间接呈现和呈现的术语与AnnotatedElement的类级别javadoc中定义的含义相同在Java 8中。如果注解被声明为元素上存在的其他注解上的元注解则注解在元素上是元存在的。如果A在另一个注解上直接存在或元存在则注解A在另一个注解上存在元。   元注解支持   大多数find *方法和此类中的一些get *方法都支持查找用作元注解的注解。有关详细信息请参阅此类中每个方法的javadoc。对于在组合注解中使用属性覆盖的元注解的细粒度支持请考虑使用AnnotatedElementUtils的更具体的方法。   属性别名   此类中返回注解注解数组或AnnotationAttributes的所有公共方法都透明地支持通过AliasFor配置的属性别名。有关详细信息请参阅各种synthesizeAnnotation *..方法。   搜索范围   一旦找到指定类型的第一个注解此类中的方法使用的搜索算法将停止搜索注解。因此将默默忽略指定类型的其他注解。 三、AnnotatedElementUtils官方解释   功能    用于在AnnotatedElements上查找注解元注解和可重复注解的常规实用程序方法。AnnotatedElementUtils为Spring的元注解编程模型定义了公共API并支持注解属性覆盖。如果您不需要支持注解属性覆盖请考虑使用AnnotationUtils。请注意JDK的内省工具本身不提供此类的功能。   注解属性覆盖   getMergedAnnotationAttributesgetMergedAnnotationgetAllMergedAnnotationsgetMergedRepeatableAnnotationsfindMergedAnnotationAttributesfindMergedAnnotationfindAllMergedAnnotations和findMergedRepeatableAnnotations的所有变体都支持组合注解中带有属性覆盖的元注解的方法。   查找与获取语义   获取语​​义Get semantics仅限于搜索AnnotatedElement上存在的注解即本地声明或继承或在AnnotatedElement上方的注解层次结构中声明的注解。   查找语义Find semantics更加详尽提供了语义加上对以下内容的支持 如果带注解的元素是类则在接口上搜索如果带注解的元素是类则在超类上搜索解析桥接方法如果带注解的元素是方法如果带注解的元素是方法则在接口中搜索方法如果带注解的元素是方法则在超类中搜索方法  支持Inherited   get语义之后的方法将遵循Java的Inherited批注的约定除了本地声明的注解包括自定义组合注解将优于继承注解。相反查找语义之后的方法将完全忽略Inherited的存在因为查找搜索算法手动遍历类型和方法层次结构从而隐式支持注解继承而不需要Inherited。 四、准备两个测试的注解 Target({ElementType.METHOD, ElementType.TYPE}) Retention(RetentionPolicy.RUNTIME) Documented interface RequestMapping {String name() default ;AliasFor(path)String[] value() default {};AliasFor(value)String[] path() default {}; }Target({ElementType.METHOD, ElementType.TYPE}) Retention(RetentionPolicy.RUNTIME) Documented RequestMapping interface PostMapping {AliasFor(annotation RequestMapping.class)String name() default ;AliasFor(annotation RequestMapping.class)String[] value() default {};AliasFor(annotation RequestMapping.class)String[] path() default {}; } 五、测试例子   父类拥有注解RequestMapping子类没有注解 public class AnnotationTest {public static void main(String[] args) {System.out.println(ParentController getAnnotation RequestMapping: AnnotationUtils.getAnnotation(ParentController.class, RequestMapping.class));System.out.println(ChildController getAnnotation RequestMapping: AnnotationUtils.getAnnotation(ChildController.class, RequestMapping.class));System.out.println();System.out.println(ParentController findAnnotation RequestMapping: AnnotationUtils.findAnnotation(ParentController.class, RequestMapping.class));System.out.println(ParentController findAnnotation RequestMapping: AnnotationUtils.findAnnotation(ChildController.class, RequestMapping.class));System.out.println();System.out.println(ParentController isAnnotated RequestMapping: AnnotatedElementUtils.isAnnotated(ParentController.class, RequestMapping.class));System.out.println(ParentController getMergedAnnotation RequestMapping: AnnotatedElementUtils.getMergedAnnotation(ParentController.class, RequestMapping.class));System.out.println(ChildController isAnnotated RequestMapping: AnnotatedElementUtils.isAnnotated(ChildController.class, RequestMapping.class));System.out.println(ChildController getMergedAnnotation RequestMapping: AnnotatedElementUtils.getMergedAnnotation(ChildController.class, RequestMapping.class));System.out.println();System.out.println(ParentController hasAnnotation RequestMapping: AnnotatedElementUtils.hasAnnotation(ParentController.class, RequestMapping.class));System.out.println(ParentController findMergedAnnotation RequestMapping: AnnotatedElementUtils.findMergedAnnotation(ParentController.class, RequestMapping.class));System.out.println(ChildController hasAnnotation RequestMapping: AnnotatedElementUtils.hasAnnotation(ChildController.class, RequestMapping.class));System.out.println(ChildController findMergedAnnotation RequestMapping: AnnotatedElementUtils.findMergedAnnotation(ChildController.class, RequestMapping.class));} }RequestMapping(value parent/controller) class ParentController { }class ChildController extends ParentController { }   输出结果如下。 ParentController getAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(name, value[parent/controller], path[parent/controller]) ChildController getAnnotation RequestMapping: nullParentController findAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(name, value[parent/controller], path[parent/controller]) ChildController findAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(name, value[parent/controller], path[parent/controller])ParentController isAnnotated RequestMapping: true ParentController getMergedAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(name, value[parent/controller], path[parent/controller]) ChildController isAnnotated RequestMapping: false ChildController getMergedAnnotation RequestMapping: nullParentController hasAnnotation RequestMapping: true ParentController findMergedAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(name, value[parent/controller], path[parent/controller]) ChildController hasAnnotation RequestMapping: true ChildController findMergedAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(name, value[parent/controller], path[parent/controller])   父类没有注解子类拥有注解RequestMapping   输出结果如下。 ParentController getAnnotation RequestMapping: null ChildController getAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(name, value[parent/controller], path[parent/controller])ParentController findAnnotation RequestMapping: null ChildController findAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(name, value[parent/controller], path[parent/controller])ParentController isAnnotated RequestMapping: false ParentController getMergedAnnotation RequestMapping: null ChildController isAnnotated RequestMapping: true ChildController getMergedAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(name, value[parent/controller], path[parent/controller])ParentController hasAnnotation RequestMapping: false ParentController findMergedAnnotation RequestMapping: null ChildController hasAnnotation RequestMapping: true ChildController findMergedAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(name, value[parent/controller], path[parent/controller])   父类拥有注解PostMapping子类没有注解 public class AnnotationTest {public static void main(String[] args) {System.out.println(ParentController getAnnotation RequestMapping: AnnotationUtils.getAnnotation(ParentController.class, RequestMapping.class));System.out.println(ChildController getAnnotation RequestMapping: AnnotationUtils.getAnnotation(ChildController.class, RequestMapping.class));System.out.println(ParentController getAnnotation PostMapping: AnnotationUtils.getAnnotation(ParentController.class, PostMapping.class));System.out.println(ChildController getAnnotation PostMapping: AnnotationUtils.getAnnotation(ChildController.class, PostMapping.class));System.out.println();System.out.println(ParentController findAnnotation RequestMapping: AnnotationUtils.findAnnotation(ParentController.class, RequestMapping.class));System.out.println(ParentController findAnnotation RequestMapping: AnnotationUtils.findAnnotation(ChildController.class, RequestMapping.class));System.out.println(ParentController findAnnotation PostMapping: AnnotationUtils.findAnnotation(ParentController.class, PostMapping.class));System.out.println(ParentController findAnnotation PostMapping: AnnotationUtils.findAnnotation(ChildController.class, PostMapping.class));System.out.println();System.out.println(ParentController isAnnotated RequestMapping: AnnotatedElementUtils.isAnnotated(ParentController.class, RequestMapping.class));System.out.println(ParentController getMergedAnnotation RequestMapping: AnnotatedElementUtils.getMergedAnnotation(ParentController.class, RequestMapping.class));System.out.println(ParentController isAnnotated PostMapping: AnnotatedElementUtils.isAnnotated(ParentController.class, PostMapping.class));System.out.println(ParentController getMergedAnnotation PostMapping: AnnotatedElementUtils.getMergedAnnotation(ParentController.class, PostMapping.class));System.out.println(ChildController isAnnotated RequestMapping: AnnotatedElementUtils.isAnnotated(ChildController.class, RequestMapping.class));System.out.println(ChildController getMergedAnnotation RequestMapping: AnnotatedElementUtils.getMergedAnnotation(ChildController.class, RequestMapping.class));System.out.println(ChildController isAnnotated PostMapping: AnnotatedElementUtils.isAnnotated(ChildController.class, PostMapping.class));System.out.println(ChildController getMergedAnnotation PostMapping: AnnotatedElementUtils.getMergedAnnotation(ChildController.class, PostMapping.class));System.out.println();System.out.println(ParentController hasAnnotation RequestMapping: AnnotatedElementUtils.hasAnnotation(ParentController.class, RequestMapping.class));System.out.println(ParentController findMergedAnnotation RequestMapping: AnnotatedElementUtils.findMergedAnnotation(ParentController.class, RequestMapping.class));System.out.println(ParentController hasAnnotation PostMapping: AnnotatedElementUtils.hasAnnotation(ParentController.class, PostMapping.class));System.out.println(ParentController findMergedAnnotation PostMapping: AnnotatedElementUtils.findMergedAnnotation(ParentController.class, PostMapping.class));System.out.println(ChildController hasAnnotation RequestMapping: AnnotatedElementUtils.hasAnnotation(ChildController.class, RequestMapping.class));System.out.println(ChildController findMergedAnnotation RequestMapping: AnnotatedElementUtils.findMergedAnnotation(ChildController.class, RequestMapping.class));System.out.println(ChildController hasAnnotation PostMapping: AnnotatedElementUtils.hasAnnotation(ChildController.class, PostMapping.class));System.out.println(ChildController findMergedAnnotation PostMapping: AnnotatedElementUtils.findMergedAnnotation(ChildController.class, PostMapping.class));} }PostMapping(value parent/controller) class ParentController { }class ChildController extends ParentController { }   输出结果如下。 ParentController getAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(name, value[], path[]) ChildController getAnnotation RequestMapping: null ParentController getAnnotation PostMapping: com.hjzgg.apigateway.test.service.main.PostMapping(name, value[parent/controller], path[parent/controller]) ChildController getAnnotation PostMapping: nullParentController findAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(name, value[], path[]) ChildController findAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(name, value[], path[]) ParentController findAnnotation PostMapping: com.hjzgg.apigateway.test.service.main.PostMapping(name, value[parent/controller], path[parent/controller]) ChildController findAnnotation PostMapping: com.hjzgg.apigateway.test.service.main.PostMapping(name, value[parent/controller], path[parent/controller])ParentController isAnnotated RequestMapping: true ParentController getMergedAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(name, value[parent/controller], path[parent/controller]) ParentController isAnnotated PostMapping: true ParentController getMergedAnnotation PostMapping: com.hjzgg.apigateway.test.service.main.PostMapping(name, value[parent/controller], path[parent/controller]) ChildController isAnnotated RequestMapping: false ChildController getMergedAnnotation RequestMapping: null ChildController isAnnotated PostMapping: false ChildController getMergedAnnotation PostMapping: nullParentController hasAnnotation RequestMapping: true ParentController findMergedAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(name, value[parent/controller], path[parent/controller]) ParentController hasAnnotation PostMapping: true ParentController findMergedAnnotation PostMapping: com.hjzgg.apigateway.test.service.main.PostMapping(name, value[parent/controller], path[parent/controller]) ChildController hasAnnotation RequestMapping: true ChildController findMergedAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(name, value[parent/controller], path[parent/controller]) ChildController hasAnnotation PostMapping: true ChildController findMergedAnnotation PostMapping: com.hjzgg.apigateway.test.service.main.PostMapping(name, value[parent/controller], path[parent/controller])     父类没有注解子类拥有注解PostMapping   输出结果如下。 ParentController getAnnotation RequestMapping: null ChildController getAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(name, value[], path[]) ParentController getAnnotation PostMapping: null ChildController getAnnotation PostMapping: com.hjzgg.apigateway.test.service.main.PostMapping(name, value[parent/controller], path[parent/controller])ParentController findAnnotation RequestMapping: null ChildController findAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(name, value[], path[]) ParentController findAnnotation PostMapping: null ChildController findAnnotation PostMapping: com.hjzgg.apigateway.test.service.main.PostMapping(name, value[parent/controller], path[parent/controller])ParentController isAnnotated RequestMapping: false ParentController getMergedAnnotation RequestMapping: null ParentController isAnnotated PostMapping: false ParentController getMergedAnnotation PostMapping: null ChildController isAnnotated RequestMapping: true ChildController getMergedAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(name, value[parent/controller], path[parent/controller]) ChildController isAnnotated PostMapping: true ChildController getMergedAnnotation PostMapping: com.hjzgg.apigateway.test.service.main.PostMapping(name, value[parent/controller], path[parent/controller])ParentController hasAnnotation RequestMapping: false ParentController findMergedAnnotation RequestMapping: null ParentController hasAnnotation PostMapping: false ParentController findMergedAnnotation PostMapping: null ChildController hasAnnotation RequestMapping: true ChildController findMergedAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(name, value[parent/controller], path[parent/controller]) ChildController hasAnnotation PostMapping: true ChildController findMergedAnnotation PostMapping: com.hjzgg.apigateway.test.service.main.PostMapping(name, value[parent/controller], path[parent/controller])   PostMapping 注有 RequestMappingAnnotationUtils和AnnotatedElementUtils区别 public class AnnotationTest {public static void main(String[] args) {System.out.println(ParentController getAnnotation RequestMapping: AnnotationUtils.getAnnotation(ParentController.class, RequestMapping.class));System.out.println(ChildController getAnnotation RequestMapping: AnnotationUtils.getAnnotation(ChildController.class, RequestMapping.class));System.out.println(ParentController findAnnotation RequestMapping: AnnotationUtils.findAnnotation(ParentController.class, RequestMapping.class));System.out.println(ChildController findAnnotation RequestMapping: AnnotationUtils.findAnnotation(ChildController.class, RequestMapping.class));System.out.println();System.out.println(ParentController getMergedAnnotation RequestMapping: AnnotatedElementUtils.getMergedAnnotation(ParentController.class, RequestMapping.class));System.out.println(ChildController getMergedAnnotation RequestMapping: AnnotatedElementUtils.getMergedAnnotation(ChildController.class, RequestMapping.class));System.out.println(ParentController findMergedAnnotation RequestMapping: AnnotatedElementUtils.findMergedAnnotation(ParentController.class, RequestMapping.class));System.out.println(ChildController findMergedAnnotation RequestMapping: AnnotatedElementUtils.findMergedAnnotation(ChildController.class, RequestMapping.class));} }RequestMapping(name parent, pathparent/controller) class ParentController { }PostMapping(namechild, value child/controller, consume application/json) class ChildController extends ParentController { }Target({ElementType.METHOD, ElementType.TYPE}) Retention(RetentionPolicy.RUNTIME) Documented interface RequestMapping {String name() default ;AliasFor(path)String[] value() default {};AliasFor(value)String[] path() default {};String[] consume() default {}; }Target({ElementType.METHOD, ElementType.TYPE}) Retention(RetentionPolicy.RUNTIME) Documented RequestMapping interface PostMapping {AliasFor(annotation RequestMapping.class)String name() default ;AliasFor(annotation RequestMapping.class)String[] value() default {};AliasFor(annotation RequestMapping.class)String[] path() default {};AliasFor(annotation RequestMapping.class)String[] consume() default ; }   输出结果如下。 ParentController getAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(nameparent, value[parent/controller], path[parent/controller], consume[]) ChildController getAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(name, value[], path[], consume[]) ParentController findAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(nameparent, value[parent/controller], path[parent/controller], consume[]) ChildController findAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(name, value[], path[], consume[])ParentController getMergedAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(nameparent, value[parent/controller], path[parent/controller], consume[]) ChildController getMergedAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(namechild, value[child/controller], path[child/controller], consume[application/json]) ParentController findMergedAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(nameparent, value[parent/controller], path[parent/controller], consume[]) ChildController findMergedAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(namechild, value[child/controller], path[child/controller], consume[application/json])   PostMapping 和 RequestMapping各自独立AnnotationUtils和AnnotatedElementUtils区别 public class AnnotationTest {public static void main(String[] args) {System.out.println(ParentController getAnnotation RequestMapping: AnnotationUtils.getAnnotation(ParentController.class, RequestMapping.class));System.out.println(ChildController getAnnotation RequestMapping: AnnotationUtils.getAnnotation(ChildController.class, RequestMapping.class));System.out.println(ParentController findAnnotation RequestMapping: AnnotationUtils.findAnnotation(ParentController.class, RequestMapping.class));System.out.println(ChildController findAnnotation RequestMapping: AnnotationUtils.findAnnotation(ChildController.class, RequestMapping.class));System.out.println();System.out.println(ParentController getMergedAnnotation RequestMapping: AnnotatedElementUtils.getMergedAnnotation(ParentController.class, RequestMapping.class));System.out.println(ChildController getMergedAnnotation RequestMapping: AnnotatedElementUtils.getMergedAnnotation(ChildController.class, RequestMapping.class));System.out.println(ParentController findMergedAnnotation RequestMapping: AnnotatedElementUtils.findMergedAnnotation(ParentController.class, RequestMapping.class));System.out.println(ChildController findMergedAnnotation RequestMapping: AnnotatedElementUtils.findMergedAnnotation(ChildController.class, RequestMapping.class));} }RequestMapping(name parent, pathparent/controller) class ParentController { }PostMapping(namechild, value child/controller, consume application/json) class ChildController extends ParentController { }Target({ElementType.METHOD, ElementType.TYPE}) Retention(RetentionPolicy.RUNTIME) Documented interface RequestMapping {String name() default ;AliasFor(path)String[] value() default {};AliasFor(value)String[] path() default {};String[] consume() default {}; }Target({ElementType.METHOD, ElementType.TYPE}) Retention(RetentionPolicy.RUNTIME) Documented interface PostMapping {AliasFor(annotation RequestMapping.class)String name() default ;AliasFor(annotation RequestMapping.class)String[] value() default {};AliasFor(annotation RequestMapping.class)String[] path() default {};AliasFor(annotation RequestMapping.class)String[] consume() default ; }   输出结果如下。 ParentController getAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(nameparent, value[parent/controller], path[parent/controller], consume[]) ChildController getAnnotation RequestMapping: null ParentController findAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(nameparent, value[parent/controller], path[parent/controller], consume[]) ChildController findAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(nameparent, value[parent/controller], path[parent/controller], consume[])ParentController getMergedAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(nameparent, value[parent/controller], path[parent/controller], consume[]) ChildController getMergedAnnotation RequestMapping: null ParentController findMergedAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(nameparent, value[parent/controller], path[parent/controller], consume[]) ChildController findMergedAnnotation RequestMapping: com.hjzgg.apigateway.test.service.main.RequestMapping(nameparent, value[parent/controller], path[parent/controller], consume[])   此时PostMapping没注有RequestMapping所以AnnotationUtis.getAnnotation()和AnnotatedElementUtils.getMergeAnnotation()方法获取RequestMapping信息为空对应的find*()方法获取到的都是父类RequestMapping信息。 六、相关方法解释   AnnotationUtils.getAnnotation   从提供的AnnotatedElement获取annotationType的单个Annotation其中注解在AnnotatedElement上存在或元存在。请注意此方法仅支持单级元注解。要支持任意级别的元注解请使用findAnnotationAnnotatedElementClass。     AnnotationUtils.findAnnotation   在提供的AnnotatedElement上查找annotationType的单个Annotation。如果注解不直接出现在提供的元素上则将搜索元注解。   AnnotatedElementUtils.isAnnotated   确定在提供的AnnotatedElement上或指定元素上方的注解层次结构中是否存在指定annotationType的注解。如果此方法返回true则getMergedAnnotationAttributes方法将返回非null值。   AnnotatedElementUtils.hasAnnotation   确定指定的annotationType的注解是否在提供的AnnotatedElement上或在指定元素上方的注解层次结构中可用。如果此方法返回true则findMergedAnnotationAttributes方法将返回非null值。   AnnotatedElementUtils.getMergedAnnotation   在提供的元素上方的注解层次结构中获取指定注解类型的第一个注解将注解的属性与注解层次结构的较低级别中的注解的匹配属性合并并将结果合成回指定注解类型的注解。完全支持AliasFor语义包括单个注解和注解层次结构。此方法委托给getMergedAnnotationAttributesAnnotatedElementClass和AnnotationUtils.synthesizeAnnotationMapClassAnnotatedElement。   AnnotatedElementUtils.findMergedAnnotation   在提供的元素上方的注解层次结构中查找指定注解类型的第一个注解将注解的属性与注解层次结构的较低级别中的注解的匹配属性合并并将结果合成回指定注解类型的注解。完全支持AliasFor语义包括单个注解和注解层次结构。 转载于:https://www.cnblogs.com/hujunzheng/p/9790588.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/916014.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

唐山网站专业制作网站的整体规划怎么写

重要: schema-defined aspects只支持singleton model,即 基于配置文件的aspects只支持单例模式 转载于:https://www.cnblogs.com/JsonShare/p/4638475.html

上传图片做网站维护微信公众号网页授权登录wordpress

题目:从一个由N个整数排列组成的整数序列中,自左向右不连续的选出一组整数,可以组成一个单调减小的子序列(如从{68 69 54 64 68 64 70 67 78 62 98 87}中我们可以选取出{69 68 64 62}这个子序列;当然,这里还有很多其他…

实用指南:玳瑁的嵌入式日记---0923(ARM)

实用指南:玳瑁的嵌入式日记---0923(ARM)pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", "…

个人博客搭建记录【hexo】

安装hexo 部署环境Node.js GitNode.js 部署,建议版本大于 12.0Node.js 安装中步骤中需要注意其中两处:Add to PATH 选上,使其集成到系统环境中: ​此处勾选会安装各种编程环境和软件,这对于安装hexo是不必要的: …

喵喵喵

笨蛋循环。笨蛋黑白染色。笨蛋欧拉回路。笨蛋欧拉回路!!笨蛋性质。笨蛋反图。笨蛋典题。笨蛋困难难题目。笨蛋猫猫。笨蛋煎蛋。笨蛋,眼睛瞎了。

Ansible自动化管理 - 指南

Ansible自动化管理 - 指南pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", "Monaco", &…

flink不同环境切换 - --

代码: package com.yourcompany.flink; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;import java.util.Properties; /** * 最简版 - 所有代码在一个文件中 */public class Minima…

网站原则广州网站开发公司

RabbitMQ:高效的消息队列中间件及其 PHP 实现 一、什么是 RabbitMQ? RabbitMQ 是一个开源的消息队列中间件,使用 Erlang 编写,遵循 AMQP(Advanced Message Queuing Protocol)协议。它的主要功能是提供一种…

ps-填充色

ps-填充色一、填充颜色用矩形选框选中范围; Ctrl + delete:填充背景色; Alt + delete:填充前景色;不将就,不强求!

PythonStudio_圆的面积demo源代码

# Powered By Python Studio, The best Python GUI IDE to download from glsite.com. import os from glcl import *class Form1(Form):def __init__(self, owner):self.Button3 = Button(self)self.Button2 = Button…

HarmonyOS 5分布式数据同步实战:跨设备待办事项应用

🔧 一、前期准备:配置与权限 在开始编码前,需要进行一些基础配置。模块配置 (module.json5): 在 module.json5文件中申请分布式数据同步权限。 {"module": {"requestPermissions": [{"na…

深入理解HarmonyOS 5的AVSession:构建跨设备媒体播放器

🎯 一、AVSession 概述与核心价值 AVSession(媒体会话)是HarmonyOS分布式媒体控制的核心框架。它允许应用程序将本地播放的媒体信息和控制能力暴露给系统,使得其他设备(如手机、平板、智慧屏)可以发现、查看和控…

Extjs小例子

Extjs小例子 1.监听文本框是否已经修改过xtype : textfield,  fieldLable : 标题,  listeners : {     change : function(field,newValue,oldValue){ alert(newValue+---+oldValue);  …

郑州网站建设怎么样短视频推广方案怎么做

随着半导体技术的不断进步,晶圆制造作为集成电路产业的核心环节,对生产过程的精密性和洁净度要求日益提高。在众多晶圆制造工具中,PFA(全氟烷氧基)晶圆夹以其独特的材质和性能,在近年来逐渐受到业界的广泛关…

HT-AD4PS-1+ 一分四射频功分器:1-500 MHz 小尺寸/低插损,通信、医疗全能打

HT-AD4PS-1+ 一分四射频功分器:1-500 MHz 小尺寸/低插损,通信、医疗全能打成都恒利泰(HenryTech)HT-AD4PS-1+ 是一款全国产化的一分四表贴功分器/合路器,频率覆盖 1-500 MHz,插入损耗≤1.8 dB,体积小巧,可直接…

HarmonyOS资源管理与访问:多分辨率与多语言适配

本文将深入探讨HarmonyOS应用开发中的资源管理机制,重点介绍多分辨率适配和多语言本地化的完整解决方案。1. 资源管理系统架构 HarmonyOS提供了统一的资源管理框架,支持应用资源的分类、访问和适配。资源管理系统采用…

面试官:为什么没有虚拟线程池?

Java 官方文档明确指出:Do not pool virtual threads. 虚拟线程不是昂贵资源,永远不应该被池化。 应该为每个任务创建一个新的虚拟线程,它们应该是短暂的、任务级别的。这是为什么呢?为什么只有虚拟线程 Virtual T…

做外国网站自媒体网络工程师和做网站哪个难

————— 第二天 —————————————————下面我们一起来研究这三个问题。问题1:哪些是需要回收的?首先我们需要知道如何哪些垃圾需要回收?判断对象是否需要回收有两种算法。一种是引用计数算法、一种是可达性分析算法。引用计…

润生软件简介:以“重构与共生”引领商业未来

2014年,广东企业家陈总敏锐洞察到:当算力实现百倍跃升,数字信息将深刻重塑社会结构,传统行业与企业形态面临全面重构。基于此,他发起创立了润生公司(Reconstruction-Symbiosis Framework,简称RS),开启一场以“…

Python 并发编程

Python 并发编程是提升程序执行效率的核心技术,尤其在处理多任务场景(如网络请求、数据计算、文件 IO 等)时至关重要。 1、threading与线程池 多线程是 Python 中最常用的并发方式之一,通过创建多个线程实现任务并…