Annotation Interface RegisterReflectionForBinding


Indicate that the classes specified in the annotation attributes require some reflection hints for binding or reflection-based serialization purpose. 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.

Annotated element can be a configuration class, for example:

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

     // ...
 }

Annotated element can also be any Spring bean class, constructor, field or method, for example:

 @Service
 public class MyService {

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

 }
Since:
6.0
Author:
Sebastien Deleuze
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<?>[]
    Classes for which reflection hints should be registered.
    Class<?>[]
    Classes for which reflection hints should be registered.
  • Element Details

    • value

      @AliasFor("classes") Class<?>[] value
      Classes for which reflection hints should be registered. At least one class must specified either in value or classes.
      See Also:
      Default:
      {}
    • classes

      @AliasFor("value") Class<?>[] classes
      Classes for which reflection hints should be registered. At least one class must specified either in value or classes.
      See Also:
      Default:
      {}