XML has restrictions on the characters that can appear in the XML id attribute,
but usually you won’t use those special characters in a bean name. Moreover, Spring allows
you to specify multiple names, separated by commas, for a bean in the name attribute. But you
can’t do so in the id attribute, as commas are not allowed there.
In fact, neither the bean name nor the bean ID is required for a bean. A bean that has no
name defined is called an anonymous bean
No comments:
Post a Comment