Skip to content

Add to JDBC component support for MapSqlParameterSource [INT-2395] #6380

@spring-operator

Description

@spring-operator

Artem Bilan opened INT-2395 and commented

When use jdbc:stored-proc components it will be more flexible to use +payload as Map+ of IN-procedure parameters.
And it allows to eliminate jdbc:parameter declaration.
Now we have to do it like this:

<jdbc:sql-parameter-definition name="I_PARAM1"/>
<jdbc:sql-parameter-definition name="I_PARAM2"/>
<jdbc:parameter name="I_PARAM1" expression="payload.I_PARAM1"/>
<jdbc:parameter name="I_PARAM2" expression="payload.I_PARAM2"/>

It can be simply fixed in the StaticBeanPropertySqlParameterSource:

this.input = input instanceof Map ? new MapSqlParameterSource((Map<String, Object>) input) : new BeanPropertySqlParameterSource(input);

or as exctraction an additional internal implementation of SqlParameterSource.


No further details from INT-2395

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions