Skip to content

Allow to use constructor-arg as bean attribute for simple case [SPR-10018] #14652

@spring-projects-issues

Description

@spring-projects-issues

Nicolas Labrot opened SPR-10018 and commented

For example I use an immutable Pair class.

I construct the class with constructor-arg :

  
<bean class="Pair">
  <constructor-arg index="0" value="first"/>
  <constructor-arg index="1" value="second"/>
</bean>

For simple case it may be interesting to set constructor arg with attributes

<bean class="Pair" c:arg1="first" c:arg2="second"/>
<bean class="Pair" c:arg1-ref="first" c:arg2-ref="second"/>

With support to spel to "cast" and infere type


Issue Links:

1 votes, 1 watchers

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions