Example usage for org.springframework.boot.context.properties ConfigurationBeanFactoryMetadata getBeansWithFactoryAnnotation

List of usage examples for org.springframework.boot.context.properties ConfigurationBeanFactoryMetadata getBeansWithFactoryAnnotation

Introduction

In this page you can find the example usage for org.springframework.boot.context.properties ConfigurationBeanFactoryMetadata getBeansWithFactoryAnnotation.

Prototype

public <A extends Annotation> Map<String, Object> getBeansWithFactoryAnnotation(Class<A> type) 

Source Link

Usage

From source file:org.springframework.boot.actuate.context.properties.ConfigurationPropertiesReportEndpoint.java

private Map<String, Object> getConfigurationPropertiesBeans(ApplicationContext context,
        ConfigurationBeanFactoryMetadata beanFactoryMetadata) {
    Map<String, Object> beans = new HashMap<>();
    beans.putAll(context.getBeansWithAnnotation(ConfigurationProperties.class));
    if (beanFactoryMetadata != null) {
        beans.putAll(beanFactoryMetadata.getBeansWithFactoryAnnotation(ConfigurationProperties.class));
    }// w  w w .ja va 2 s.c om
    return beans;
}