Skip to content

DataSourcePublicMetrics does not find data sources in parent context #5196

@shalom938

Description

@shalom938

we have a context hierarchy and the data sources are in a parent context.
DataSourcePublicMetrics retrieves DataSource's like that:

for (Map.Entry<String, DataSource> entry : this.applicationContext
                .getBeansOfType(DataSource.class).entrySet()) {

it does not find the DataSource's in parent contexts,
I had to copy the code and change this line to :

for (Map.Entry<String, DataSource> entry : BeanFactoryUtils.beansOfTypeIncludingAncestors(applicationContext.getBeanFactory(),DataSource.class).entrySet()) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions