Skip to content
This repository was archived by the owner on Mar 6, 2020. It is now read-only.
This repository was archived by the owner on Mar 6, 2020. It is now read-only.

ConnectionFactoryAutoConfiguration runs before a ConnectionPool bean is configured #80

@eduardo-bueno-ifood

Description

@eduardo-bueno-ifood

I was trying to set up the auto-configured metrics for r2dbc and noticed that ConnectionPoolMetricsAutoConfiguration was not being touched in Spring initialization. Turns out that the annotation @ConditionalOnBean({ ConnectionPool.class, MeterRegistry.class }) does not wait for a ConnectionPool to be available and thus this configuration never runs. I have gone around this by providing a ConnectionPool bean in a configuration class and marking it with @AutoConfigureBefore(ConnectionPoolMetricsAutoConfiguration::class).

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