Have problem understanding the id/name of java bean
Posted
by symfony
on Stack Overflow
See other posts from Stack Overflow
or by symfony
Published on 2010-03-21T06:52:57Z
Indexed on
2010/03/21
7:01 UTC
Read the original article
Hit count: 346
In an XmlBeanFactory (including ApplicationContext variants), you use the id or name attributes to specify the bean id(s), and at least one id must be specified in one or both of these attributes.
Does it mean the following are legal?
<bean id="test">
<bean name="test">
But this is illegal:
<bean non_idnorname="test">
you may also or instead specify one or more bean ids (separated by a comma (,) or semicolon (;) via the name attribute.
Does it mean I can specify multiple ids this way:
<bean name="id1;id2,id3">
Can someone convince my doubt?
© Stack Overflow or respective owner