Annotation Interface ExposeHazelcastObjects


Annotation that instruments Spring to expose Hazelcast objects as beans.

Using this annotation on your configuration will register beans of:

Data structures will be exposed if configured:
  • via static Java configuration (when starting the cluster with new Config object).
  • via dynamic Java configuration (e.g. when configured using instance.getConfig().addMapConfig). Note that the autowiring is done once; therefore dynamically added configuration after ApplicationContext is initialized on one member will be used to autowire objects on newly created member, but not on the member that added the dynamic configuration
  • via XML/YAML static configuration
If there is already a bean named the same as some Hazelcast object, the bean with Hazelcast object will not be registered.
Since:
6.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
     
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Specifies which objects will not be exposed as Spring beans.
    Class<?>[]
    Specifies which types of objects won't be exposed as Spring beans.
    Specifies which (by name) objects will be exposed as Spring beans.
    Class<?>[]
    Specifies which types of objects will be exposed as Spring beans.
  • Element Details

    • includeByName

      String[] includeByName
      Specifies which (by name) objects will be exposed as Spring beans.

      By default, all objects listed in ExposeHazelcastObjects are exposed, this option allows user to narrow the functionality to only some part of objects.

      Default:
      {}
    • excludeByName

      String[] excludeByName
      Specifies which objects will not be exposed as Spring beans.

      By default, all objects listed in ExposeHazelcastObjects are exposed, this option allows user to narrow the functionality and exclude unwanted objects from being added as Spring beans.

      Default:
      {}
    • includeByType

      Class<?>[] includeByType
      Specifies which types of objects will be exposed as Spring beans.

      By default, all objects will be included.

      Default:
      {}
    • excludeByType

      Class<?>[] excludeByType
      Specifies which types of objects won't be exposed as Spring beans.

      By default, no type is excluded.

      Default:
      {}