spring-boot: Spring does not respect jpa bootstrap mode in application.properties
spring.data.jpa.repositories.bootstrap-mode has been reverted to default since spring boot 2.4.1. I want to enable spring.data.jpa.repositories.bootstrap-mode=deferred but it is ignored (logs says DEFAULT)
However it is correctly enabled if instead of setting an application.propety, I set it with @EnableJpaRepositories(“com.rebirthCorp.rebirth.repositories”, bootstrapMode = BootstrapMode.DEFERRED)
Note: this might help you find the root cause of the bug:
Multiple Spring Data modules found, entering strict repository configuration mode!
@SpringBootApplication
@EnableIntegration
@EnableJpaRepositories("com.rebirthCorp.rebirth.repositories", bootstrapMode = BootstrapMode.DEFERRED)
@EnableElasticsearchRepositories("com.rebirthCorp.rebirth.elasticrepositories")
class RebirthApplication
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (6 by maintainers)
I had the same problem. Would prefer to configure through the properties rather than changing the mode in the @EnableJpaConfiguration annotation.