spring-projects / spring-projects/spring-boot
Allow Data JDBC Dialect resolution without requiring DataSource initialization
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 81.5k
- Forks
- 42.7k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 65
Description
When obtaining a Dialect bean using Spring Data JDBC, the @Bean method depends on NamedParameterJdbcOperations leading to initialization of the entire bean graph including DataSource initialization even if the dialect is provided through properties (spring.data.jdbc.dialect=…). It would be good if access to NamedParameterJdbcOperations could be lazy.
The JDBC config itself isn't helpful in that regard as it declares NamedParameterJdbcOperations in its signature. Maybe an opportunity for improvement as well.
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
Start by tracing the JDBC configuration and the @Bean method that resolves the Dialect, then inspect how its NamedParameterJdbcOperations parameter triggers DataSource initialization. Done means a dialect supplied by spring.data.jdbc.dialect can be obtained without initializing DataSource while the configuration remains functional; check or add focused tests around that startup path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100