Skip to content

Make DynamicPropertyRegistrarBeanInitializer public #33593

@wilkinsona

Description

@wilkinsona

Overview

Affects: 6.2

Following up on this comment, we have prototyped a change to Spring Boot that is a step towards replacing its support for injecting a DynamicPropertyRegistry with support for DynamicPropertyRegistrar beans instead.

As explained in the comment in #33501, additional support for DynamicPropertyRegistrar is needed for dynamic property registration when using Testcontainers at development time. In tests, it isn't needed as the test context framework already enables the support through its context customizer.

The prototype of the changes to Boot currently uses reflection when defining a DynamicPropertyRegistrarBeanInitializer bean as the initializer is package-private. This has helped to verify the approach but isn't something that we'd want to ship.

Can Framework 6.2 please provide an SPI for enabling DynamicPropertyRegistrar support outside of the test context framework, or perhaps just make DynamicPropertyRegistrarBeanInitializer public so that we don't need to use reflection?

Related Issues

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions