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?
Comment From: philwebb
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.
Comment From: philwebb
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
Comment From: quaff
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
?
Comment From: wilkinsona
Just properties sounds good to me.
and defaults to
null
or add another option such asdefault
orcase-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.
Comment From: quaff
Superseded by GH-44470