Issue 1:
Scott Haug opened SPR-1136 and commented

When setting a property with a factory-bean/factory-method -enabled inner bean, I'm prevented from keeping the bean anonymous. Consider the following:

<bean id="foo1" class="example.Foo">
<property name="bar" value="baz"/>
</bean>

<bean id="foo2" class="example.Foo">
<property name="bar">
<bean factory-bean="foo1" factory-method="getBar"/>
</property>
</bean>

Loading this config results in the following exception:

org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name '' defined in ServletContext resource [config.xml]: Unnamed bean definition specifies neither 'class' nor 'parent' - can't generate name

at org.springframework.beans.factory.support.BeanDefinitionReaderUtils.generateBeanName(BeanDefinitionReaderUtils.java:102)

at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement(DefaultXmlBeanDefinitionParser.java:331)

at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parsePropertySubElement(DefaultXmlBeanDefinitionParser.java:660)

at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parsePropertyValue(DefaultXmlBeanDefinitionParser.java:650)

at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parsePropertyElement(DefaultXmlBeanDefinitionParser.java:593)

at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parsePropertyElements(DefaultXmlBeanDefinitionParser.java:492)

at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement(DefaultXmlBeanDefinitionParser.java:360)

at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement(DefaultXmlBeanDefinitionParser.java:328)

at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions(DefaultXmlBeanDefinitionParser.java:265)

at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(DefaultXmlBeanDefinitionParser.java:185)

at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:238)

at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:155)

at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:99)

...

Giving the inner bean an id is a sufficient workaround for the issue, but obviously it would be nice if this wasn't necessary.

Affects: 1.2.2

Issue Links:

#5911 anonymous inner bean without class and parent attributes fails to load ("is duplicated by")

Issue 2:
Dave Syer opened SPR-4738 and commented

Scan classpath for persistence annotations when creating session factory for hibernate. The AnnotationSessionFactoryBean requires me to explictly enumerate all classes that are annotated, whereas I know Spring could discover that for me, e.g.:

<bean id="sessionFactory"
class="org...AutoDiscoverAnnotationSessionFactoryBean">
<property name="basePackage"
value="com.springsource.consulting.integration" />
<property name="dataSource" ref="dataSource" />
...
</bean>

Affects: 2.5.3

Issue Links:

#6038 Auto-pickup of entity beans ("duplicates")