Annotation Interface RegisterReflectionForBinding


Indicates that the classes specified in the annotation attributes require some reflection hints for binding or reflection-based serialization purposes. For each class specified, hints on constructors, fields, properties, record components, including types transitively used on properties and record components are registered. At least one class must be specified in the value or classes annotation attributes.

The annotated element can be a configuration class — for example:


  @Configuration
  @RegisterReflectionForBinding({ Foo.class, Bar.class })
  public class MyConfig {
     // ...
  }
 

The annotated element can be any Infra bean class, constructor, field, or method — for example:


 @Service
 public class MyService {

     @RegisterReflectionForBinding(Baz.class)
     public void process() {
         // ...
     }

 }
 

The annotated element can also be any test class that uses the Infra TestContext Framework to load an ApplicationContext.

从以下版本开始:
4.0
作者:
Sebastien Deleuze
另请参阅:
  • 可选元素概要

    可选元素
    修饰符和类型
    可选元素
    说明
    Class<?>[]
    Classes for which reflection hints should be registered.
    Class<?>[]
    Alias for classes().
  • 元素详细资料