Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using @EnableJdbcRepositories and extending JdbcConfiguration causes duplicate bean registrations [DATAJDBC-243] #467

Closed
spring-projects-issues opened this issue Jul 26, 2018 · 0 comments
Assignees
Labels
in: repository type: bug

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Jul 26, 2018

Mark Paluch opened DATAJDBC-243 and commented

@EnableJdbcRepositories imports JdbcConfiguration which prevents users from extending from JdbcConfiguration in their code when using Spring Boot 2.1 with strict override detection.

In any case, this arrangement causes bean overrides and sorting out the priority in which beans are registered causes trouble for users.

We should remove the JdbcConfiguration import and leave it to users to import the required configuration.
In a second step, we should conditionally register the required components (RelationalMappingContext, RelationalConverter) within JdbcRepositoryConfigExtension to align with other store modules


Issue Links:

  • DATAJDBC-244 Conditionally register RelationalMappingContext and RelationalConverter in JdbcRepositoryConfigExtension
    ("is depended on by")
@spring-projects-issues spring-projects-issues added type: bug in: repository labels Dec 31, 2020
mp911de added a commit that referenced this issue Feb 21, 2022
Migrate also ExternalDatabase from JUnit rule to BeforeAllCallback and RegisterExtension.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: repository type: bug
Projects
None yet
Development

No branches or pull requests

2 participants