<bdo id='xMwTm'></bdo><ul id='xMwTm'></ul>

<i id='xMwTm'><tr id='xMwTm'><dt id='xMwTm'><q id='xMwTm'><span id='xMwTm'><b id='xMwTm'><form id='xMwTm'><ins id='xMwTm'></ins><ul id='xMwTm'></ul><sub id='xMwTm'></sub></form><legend id='xMwTm'></legend><bdo id='xMwTm'><pre id='xMwTm'><center id='xMwTm'></center></pre></bdo></b><th id='xMwTm'></th></span></q></dt></tr></i><div id='xMwTm'><tfoot id='xMwTm'></tfoot><dl id='xMwTm'><fieldset id='xMwTm'></fieldset></dl></div>

  • <tfoot id='xMwTm'></tfoot>

        <small id='xMwTm'></small><noframes id='xMwTm'>

        <legend id='xMwTm'><style id='xMwTm'><dir id='xMwTm'><q id='xMwTm'></q></dir></style></legend>
      1. 保留 CGLIB 代理上的注释?

        时间:2023-07-26
          <bdo id='bBxC2'></bdo><ul id='bBxC2'></ul>

              • <tfoot id='bBxC2'></tfoot>

                <small id='bBxC2'></small><noframes id='bBxC2'>

              • <i id='bBxC2'><tr id='bBxC2'><dt id='bBxC2'><q id='bBxC2'><span id='bBxC2'><b id='bBxC2'><form id='bBxC2'><ins id='bBxC2'></ins><ul id='bBxC2'></ul><sub id='bBxC2'></sub></form><legend id='bBxC2'></legend><bdo id='bBxC2'><pre id='bBxC2'><center id='bBxC2'></center></pre></bdo></b><th id='bBxC2'></th></span></q></dt></tr></i><div id='bBxC2'><tfoot id='bBxC2'></tfoot><dl id='bBxC2'><fieldset id='bBxC2'></fieldset></dl></div>
                  <tbody id='bBxC2'></tbody>
                1. <legend id='bBxC2'><style id='bBxC2'><dir id='bBxC2'><q id='bBxC2'></q></dir></style></legend>
                  本文介绍了保留 CGLIB 代理上的注释?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  Am trying to create an object using an AOP framework which uses CGLIB to create proxy objects. Strangely enough, the "enhanced" proxy object is devoid of ANY annotations the previous class had!

                  Can anyone tell me how can I make CGLIB retain the annotations on the proxies it creates?

                  Cheers! Nirav

                  解决方案

                  CGLIB creates subclasses of given classes to generate proxies. Annotations are not preserved in subclasses unless explicitly specified in annotation definition. @Inherited annotation is used for this purpose.

                  You can use this annotation in the annotations you define, and make them reachable in subclasses, as following:

                  @Inherited
                  @Retention(RetentionPolicy.RUNTIME)
                  @Target(ElementType.TYPE)
                  public @interface MyAnnotation {
                  }
                  

                  这篇关于保留 CGLIB 代理上的注释?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:使 java 编译器在使用带注释的方法时发出警告(如 下一篇:未调用跨域验证的自定义类级别约束

                  相关文章

                  最新文章

                    <bdo id='EoiJD'></bdo><ul id='EoiJD'></ul>

                2. <i id='EoiJD'><tr id='EoiJD'><dt id='EoiJD'><q id='EoiJD'><span id='EoiJD'><b id='EoiJD'><form id='EoiJD'><ins id='EoiJD'></ins><ul id='EoiJD'></ul><sub id='EoiJD'></sub></form><legend id='EoiJD'></legend><bdo id='EoiJD'><pre id='EoiJD'><center id='EoiJD'></center></pre></bdo></b><th id='EoiJD'></th></span></q></dt></tr></i><div id='EoiJD'><tfoot id='EoiJD'></tfoot><dl id='EoiJD'><fieldset id='EoiJD'></fieldset></dl></div>
                3. <small id='EoiJD'></small><noframes id='EoiJD'>

                4. <legend id='EoiJD'><style id='EoiJD'><dir id='EoiJD'><q id='EoiJD'></q></dir></style></legend>
                  <tfoot id='EoiJD'></tfoot>