spring-projects / spring-projects/spring-boot
HibernateJpaAutoConfiguration does not back off despite LocalContainerEntityManagerFactory beans being declared manually
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 81.5k
- Forks
- 42.7k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 65
Description
If you remove the manual exclusion for the HibernateJpaAutoConfiguration here the application bootstrap will blow up trying to apply the auto configuration and failing to wire the unique DataSource expected to be present. I wonder why the configuration is getting applied in the first place, as I would've expected the manual declarations of LocalContainerEntityManagerFactoryBeans here and here to disable the auto-configuration in the first place.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the bootstrap failure in the spring-data-examples jpa/multiple-datasources sample after removing the HibernateJpaAutoConfiguration exclusion in Application.java. Read the manual LocalContainerEntityManagerFactoryBean declarations in customer/CustomerConfig.java and order/OrderConfig.java, then inspect the related Spring Boot auto-configuration behavior. Done means the reported interaction is corrected or its expected behavior is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100