Skip to content

Reuse MapPropertySource for DynamicValuesPropertySource implementation (as a template for custom variants) #32110

Closed
@philwebb

Description

@philwebb

Currently Spring Boot has it's own version of DynamicValuesPropertySource called TestcontainersPropertySource. This class is testcontainers specific and includes some extra functionality, but the basic logic for the core methods is copy/paste from the package-private framework class.

Recently @rwinch has started to reuse TestcontainersPropertySource in the spring-boot-testjars experimental project. This isn't ideal since that project should not depend on spring-boot-testcontainers. We can't move TestcontainersPropertySource and there isn't a good home in Spring Boot to create another public variant so we wondered if the Spring Framework class should be made public instead?

The alternative is to copy/paste the code again into spring-boot-testjars.

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)in: testIssues in the test moduletype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions