org.springframework.context.annotation

## Class MBeanExportConfiguration

- java.lang.Object
- - org.springframework.context.annotation.MBeanExportConfiguration

- All Implemented Interfaces:
    Aware, BeanFactoryAware, ImportAware

      @Configuration
      public class MBeanExportConfiguration
      extends Object
      implements ImportAware, BeanFactoryAware

  `@Configuration` class that registers a `AnnotationMBeanExporter` bean.

  This configuration class is automatically imported when using the @`EnableMBeanExport` annotation. See its Javadoc for complete usage details.

  Since:
    3.2
  Author:
    Phillip Webb, Chris Beams
  See Also:
    `EnableMBeanExport`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MBeanExportConfiguration()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `AnnotationMBeanExporter` | `mbeanExporter()`
    `void` | `setBeanFactory(BeanFactory beanFactory)` Callback that supplies the owning factory to a bean instance.
    `void` | `setImportMetadata(AnnotationMetadata importMetadata)` Set the annotation metadata of the importing @`Configuration` class.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MBeanExportConfiguration

          public MBeanExportConfiguration()

  - ### Method Detail

    - #### setImportMetadata

          public void setImportMetadata(AnnotationMetadata importMetadata)

      Description copied from interface: `ImportAware`
      Set the annotation metadata of the importing @`Configuration` class.
      Specified by:
        `setImportMetadata` in interface `ImportAware`

    - #### setBeanFactory

          public void setBeanFactory(BeanFactory beanFactory)
                              throws BeansException

      Description copied from interface: `BeanFactoryAware`
      Callback that supplies the owning factory to a bean instance.

      Invoked after the population of normal bean properties but before an initialization callback such as `InitializingBean.afterPropertiesSet()` or a custom init-method.

      Specified by:
        `setBeanFactory` in interface `BeanFactoryAware`
      Parameters:
        `beanFactory` - owning BeanFactory (never `null`). The bean can immediately call methods on the factory.
      Throws:
        `BeansException` - in case of initialization errors
      See Also:
        `BeanInitializationException`

    - #### mbeanExporter

          @Bean(name="mbeanExporter")
          @Role(value=2)
          public AnnotationMBeanExporter mbeanExporter()