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

Some JdbcTemplate configuration properties are missing #44419

Closed
quaff opened this issue Feb 24, 2025 · 5 comments · May be fixed by #44470
Closed

Some JdbcTemplate configuration properties are missing #44419

quaff opened this issue Feb 24, 2025 · 5 comments · May be fixed by #44470
Labels
status: superseded An issue that has been superseded by another

Comments

@quaff
Copy link
Contributor

quaff commented Feb 24, 2025

Currently, there are three configuration properties under spring.jdbc.template:

  • fetch-size
  • max-rows
  • query-timeout

there are more configuration properties not covered by JdbcProperties:

  • ignore-warnings
  • skip-results-processing
  • skip-undeclared-results
  • results-map-case-insensitive

Before starting to work on this, I would ask the team is it worthy to autoconfigure them by JdbcProperties or provide an JdbcTemplateCustomizer or both?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 24, 2025
@philwebb
Copy link
Member

I personally lean towards adding the properties but not the customizer since replacing the JdbcTemplate bean entirely isn't that onerous. Flagging to see what others in the team think.

@philwebb philwebb added the for: team-attention An issue we'd like other members of the team to review label Feb 24, 2025
@philwebb
Copy link
Member

I wonder if an enum set might also work well for the results options? E.g. spring.jdbc.template.results=skip-processing,skip-undeclared,case-insensitive-map

@quaff
Copy link
Contributor Author

quaff commented Feb 26, 2025

I wonder if an enum set might also work well for the results options? E.g. spring.jdbc.template.results=skip-processing,skip-undeclared,case-insensitive-map

Is callable-results a better name? and defaults to null or add another option such as default or case-sensitive-map?

@wilkinsona
Copy link
Member

Just properties sounds good to me.

and defaults to null or add another option such as default or case-sensitive-map

Along these lines, I'm not sure about a single property as it creates a problem with switching things off. For example, if someone's set spring.jdbc.template.results=skip-undeclared how do we go back to the defaults? A default value in the enum would help with that, but then what does a value of default, skip-undeclared mean?

I think three separate properties, each defaulting to false, might be better unfortunately.

quaff added a commit to quaff/spring-boot that referenced this issue Feb 28, 2025
- ignore-warnings
- skip-results-processing
- skip-undeclared-results
- results-map-case-insensitive

Fix spring-projectsGH-44419

Signed-off-by: Yanming Zhou <[email protected]>
@quaff
Copy link
Contributor Author

quaff commented Feb 28, 2025

Superseded by GH-44470

@quaff quaff closed this as completed Feb 28, 2025
@wilkinsona wilkinsona closed this as not planned Won't fix, can't repro, duplicate, stale Feb 28, 2025
@wilkinsona wilkinsona added status: superseded An issue that has been superseded by another and removed for: team-attention An issue we'd like other members of the team to review status: waiting-for-triage An issue we've not yet triaged labels Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: superseded An issue that has been superseded by another
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants