Skip to content

add support for arrays inside the xml configuration (<array> element) [SPR-5543] #10214

@spring-projects-issues

Description

@spring-projects-issues

Costin Leau opened SPR-5543 and commented

Please add support for <array> to the beans schema. An example definition would like this:

<osgi:component id="arrayExample" class="example.ArrayBean">

<property name="myInts">
<array value-type="int">
<value>1</value>
<value>2</value>
<value>3</value>
<value>5</value>
<value>8</value>
</array>
</property>
<property name="myStrings">
<array value-type="java.lang.String">
<value>one</value>
<value>two</value>
<value>three</value>
<value>five</value>
<value>eight</value>
</array>
</property>
</osgi:component>
It would be nice if the array could try to determine the its type automatically (i.e. check the type of its elements and determine the lowest common class). However, this might be problematic when conversion is involved so maybe it's best for now to require the array type.


Affects: 3.0 M2

Referenced from: commits 1b5812d

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions