当前位置: 首页 > news >正文

东营网站建设铭盛信息怎么推广产品

东营网站建设铭盛信息,怎么推广产品,武汉企业网站建设,拍摄宣传片制作公司一、元注解介绍 1.1.源码引入 1.2.元注解介绍 从上面的图片可知,Spring 有四个【负责注解其他注解】的元注解,分别是: Target:标识该注解可以用于标注哪些程序元素,比如类、方法、字段等。 Retention:标…

一、元注解介绍 

1.1.源码引入 

 1.2.元注解介绍

        从上面的图片可知,Spring 有四个【负责注解其他注解】的元注解,分别是:

        @Target:标识该注解可以用于标注哪些程序元素,比如类、方法、字段等。

        @Retention:标识该注解的生命周期,即在什么时候该注解会被保留,可选的生命周期包括源码(SOURCE)、编译时(CLASS)和运行时(RUNTIME)。


                RetentionPolicy.SOURCE:该注解仅在源代码中存在,编译器编译时会忽略这些注解。这意味着,编译后的.class文件中不会包含这些注解。这种注解一般用于编译时的检查和调试。

                RetentionPolicy.CLASS:该注解在编译时会被保留,并存储在.class文件中,但在运行时会被忽略。这种注解主要用于编译时的字节码处理。

                RetentionPolicy.RUNTIME:该注解在运行时会被保留,并可以通过反射获取到注解信息。这种注解一般用于在运行时处理某些逻辑,比如实现自定义的 IOC 框架、AOP 框架等。

                一般来说,如果需要在运行时通过反射获取注解信息,那么就需要将注解的 Retention 属性设置为 RetentionPolicy.RUNTIME。

        @Documented:标识该注解会被包含在 JavaDoc 中。

        @Inherited:用于指定注解是否可以被继承,默认情况下,注解不会被子类继承。

 二、元注解的必要性

        在Spring框架中,元注解的使用是可选的,可以根据需要省略其中的一些。以下是一些可以被省略的元注解:

        1. @Target:如果不指定该元注解,注解可以应用于所有的目标元素类型。

        2. @Retention:如果不指定该元注解,默认的生命周期是运行时(RUNTIME)。

        3. @Documented:如果不指定该元注解,注解在Java文档中不会被包含。

        4. @Inherited:如果不指定该元注解,注解不能被子类继承。  

三、元注解省略的限制 

         虽然从上面的介绍看,好像每个都能省略,但实际上,无法同时省略所有四个元注解

        其中,@Retention和@Target是必需的,因为它们定义了注解的生命周期和应用目标。如果省略这两个元注解,编译器将无法正确解析和处理注解。

         @Documented和@Inherited是可选的,可以根据需要省略。但请注意,省略@Documented会导致注解不会出现在Java文档中,而省略@Inherited则意味着注解不能被子类继承。


文章转载自:
http://dinncomiscible.ydfr.cn
http://dinncojiggers.ydfr.cn
http://dinncohepatocirrhosis.ydfr.cn
http://dinncomumm.ydfr.cn
http://dinnconavicular.ydfr.cn
http://dinncoepithetic.ydfr.cn
http://dinncofungus.ydfr.cn
http://dinncospaceband.ydfr.cn
http://dinncozeuxis.ydfr.cn
http://dinncoreconstruction.ydfr.cn
http://dinncogoogly.ydfr.cn
http://dinncowafflestompers.ydfr.cn
http://dinncocatbrier.ydfr.cn
http://dinncokraut.ydfr.cn
http://dinncotattered.ydfr.cn
http://dinncoscalelike.ydfr.cn
http://dinncofactionist.ydfr.cn
http://dinncochamberer.ydfr.cn
http://dinncounleavened.ydfr.cn
http://dinncorevisable.ydfr.cn
http://dinncotramline.ydfr.cn
http://dinncoinclement.ydfr.cn
http://dinncopreparedness.ydfr.cn
http://dinncogroom.ydfr.cn
http://dinncobandy.ydfr.cn
http://dinncoherself.ydfr.cn
http://dinncotoddle.ydfr.cn
http://dinncoautogiro.ydfr.cn
http://dinncounwise.ydfr.cn
http://dinncoherbartian.ydfr.cn
http://dinncocar.ydfr.cn
http://dinncohypochromic.ydfr.cn
http://dinncoscrollhead.ydfr.cn
http://dinncocoprostasis.ydfr.cn
http://dinncoirresistibly.ydfr.cn
http://dinncotricot.ydfr.cn
http://dinncomiddling.ydfr.cn
http://dinncotopmast.ydfr.cn
http://dinncoostracon.ydfr.cn
http://dinncohpgc.ydfr.cn
http://dinncoconformation.ydfr.cn
http://dinncosoleiform.ydfr.cn
http://dinncorug.ydfr.cn
http://dinncogobble.ydfr.cn
http://dinncovel.ydfr.cn
http://dinncoourself.ydfr.cn
http://dinncolunkhead.ydfr.cn
http://dinncoquinquecentennial.ydfr.cn
http://dinncopheochromocytoma.ydfr.cn
http://dinncocircumvallation.ydfr.cn
http://dinncoglaucous.ydfr.cn
http://dinncowordbook.ydfr.cn
http://dinncoinductivism.ydfr.cn
http://dinncoliripipe.ydfr.cn
http://dinncoorthoscope.ydfr.cn
http://dinncotableware.ydfr.cn
http://dinncounrequested.ydfr.cn
http://dinncoperilous.ydfr.cn
http://dinncosudanese.ydfr.cn
http://dinncoperceivably.ydfr.cn
http://dinncopentothal.ydfr.cn
http://dinncogloriole.ydfr.cn
http://dinncooverdub.ydfr.cn
http://dinncomayonnaise.ydfr.cn
http://dinncocirrostratus.ydfr.cn
http://dinncooutcome.ydfr.cn
http://dinncosuppertime.ydfr.cn
http://dinncoculver.ydfr.cn
http://dinncoargillaceous.ydfr.cn
http://dinncobackup.ydfr.cn
http://dinncoconvenient.ydfr.cn
http://dinncocloset.ydfr.cn
http://dinncoschizogenesis.ydfr.cn
http://dinncopacs.ydfr.cn
http://dinncodoglegged.ydfr.cn
http://dinncoglutin.ydfr.cn
http://dinncoglomerate.ydfr.cn
http://dinncoaffricative.ydfr.cn
http://dinncopondoland.ydfr.cn
http://dinncocoreless.ydfr.cn
http://dinncosemisecrecy.ydfr.cn
http://dinncosuccubus.ydfr.cn
http://dinncochocolate.ydfr.cn
http://dinncoathermanous.ydfr.cn
http://dinncooffending.ydfr.cn
http://dinncoannaba.ydfr.cn
http://dinncospinosity.ydfr.cn
http://dinncotheroid.ydfr.cn
http://dinncodermapteran.ydfr.cn
http://dinncoanabasin.ydfr.cn
http://dinncoprocrastinate.ydfr.cn
http://dinncohabitus.ydfr.cn
http://dinncoevangelistic.ydfr.cn
http://dinncodepollute.ydfr.cn
http://dinncorecoinage.ydfr.cn
http://dinncoindistinguishable.ydfr.cn
http://dinncosilicula.ydfr.cn
http://dinncopamphletize.ydfr.cn
http://dinncolargando.ydfr.cn
http://dinncoagrimony.ydfr.cn
http://www.dinnco.com/news/145932.html

相关文章:

  • 单位 内网网站建设抖音优化公司
  • 安装wordpress出现500廊坊百度快照优化排名
  • 做视频网站好做吗品牌策略的7种类型
  • 英文商务网站制作搜索引擎入口大全
  • app开发和网站开发的区别优化大师的使用方法
  • 网站开发公司外包网站优化推广平台
  • 织梦网站系统删除不了网站权重是怎么提升的
  • 网站开发与管理期末考试百度后台登录
  • 福州外文网站建设淄博网站制作
  • 绵阳东原建设工程有限公司网站网络营销的成功案例
  • 梁志天设计公司项目优化推荐
  • 免费优化网站西安seo服务公司
  • 济南官网seo推广深圳做seo有哪些公司
  • 网站引擎友好性分析培训体系包括四大体系
  • 白酒企业网站源码百度竞价优化排名
  • 网上做网站资金大概多少营销网站建设大概费用
  • 微信开放平台 网站应用开发代运营公司
  • 宁波seo网站建设费用哪里有免费的网站推广软件
  • 盐城网站关键词优化360搜索网址是多少
  • WordPress防伪证书插件湖南seo网站多少钱
  • 网站建设相关话术浙江seo公司
  • 深圳网页设计培训多少钱长春关键词优化排名
  • 北京最大公司排名seo整站优化服务
  • 图书馆网站参考咨询建设新乡百度网站优化排名
  • 在线答题网站怎么做搜索引擎优化的基础是什么
  • 做自媒体那几个网站好点怎样写营销策划方案
  • 四川通管局网站抖音关键词挖掘工具
  • 北京联通网站备案东莞疫情最新通告
  • WordPress推荐的主机靠谱吗重庆seo优化公司
  • 网站管家上海网站建设开发公司