Skip to content

Allow auto-configuration to consume service connection information from sources other than configuration properties #34657

@wilkinsona

Description

@wilkinsona

We'd like our auto-configurations to be able to consume service connection information from sources other than configuration properties. When such connection details are available, they should take precedence over connection-related configuration properties while continuing to use other configuration properties that are not related to establishing a connection with a remote service. For example, connection details for an SQL database may be a JDBC url, a username, and a password. When such details are available, application properties for configuring things like a maximum connection pool size will still be used.

Using connection details rather than application properties allows the properties related to connecting to a service to be ignored as a single unit, avoiding problems where a configuration property has been set and needs to be unset to allow the service to be used correctly.

This feature is largely intended as a building block on top of which other more user-facing features will be built. For example, it will allow us to offer improved integration with Testcontainers, removing boilerplate for getting the auto-configuration to use a service in a @Container-annotated field in a test class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions