spring-plugin icon indicating copy to clipboard operation
spring-plugin copied to clipboard

BeanListFactoryBean does not have "lists" property

Open Ray-C opened this issue 9 years ago • 1 comments

Tried to configure spring-plug bean, BeanListFactoryBean, as per example in introduction. It seems there is no "lists" property in this bean (couldn't see it in the source either). The resultant exception is this:

SEVERE: Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.plugin.core.support.BeanListFactoryBean#0' defined in class path resource [plugins-config-host.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'lists' of bean class [org.springframework.plugin.core.support.BeanListFactoryBean]: Bean property 'lists' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter? at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1512) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1220) ...

Ray-C avatar Jul 12 '16 15:07 Ray-C

Looks like the reference docs are out of date slightly. The property to configure is type taking a fully-qualified class name directly. Generally speaking we're recommending to use the XML namespace or the annotation these days.

Also, the BeanListFactoryBean is kind of obsolete these days as the container supports ordering beans injected via a List out of the box.

odrotbohm avatar Aug 16 '16 12:08 odrotbohm