Skip to content

Refine repositoryBaseClass property configuration for @Enable…Repositories repository factory definitions #3423

@mp911de

Description

@mp911de

We should avoid setting the repositoryBaseClass unless it is explicitly configured through @Enable…Repositories. This keeps the customization path for repository factories and factory beans straightforward. In the scenario described in spring-projects/spring-data-jpa#4093, the customization involves a CustomRepositoryFactoryBean that contributes a custom repository factory in order to define the base class globally.

While this setup could be simplified by specifying @Enable…Repositories(repositoryBaseClass = …), our infrastructure currently overrides the repositoryBaseClass with the store-specific variant.

As a result, property values applied to RepositoryFactoryBeanSupport override any properties set in e.g. constructors which prevents local customizations of the repository base class.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions