spring considers setup() function as property
i got following error on spring 3.1.2:
Error: org.springframework.beans.factory.UnsatisfiedDepen dencyException: Error creating bean with name 'org.nutch.tools.dbstats.StatMapper': Unsatisfied dependency expressed through bean property 'up': Set this property value or disable dependency checking for this bean.
when i called: springContext.getAutowireCapableBeanFactory().auto wireBeanProperties(o,AutowireCapableBeanFactory.AU TOWIRE_BY_TYPE, true);
problem is that this bean has no property called up, but there is setup() function, which might be missunderstood by spring as property up. But there is no getup() function.
Is this bug in spring property detection?
public class StatMapper extends SpringMapper<Text, CrawlDatum, Text, LongWritable> {
private LongWritable COUNT_1 = new LongWritable(1);
private boolean sort = false;
@Inject
private DBStat dbs;
@Override
public void setup(Context context) throws IOException, InterruptedException {
...
public class SpringMapper <KEYIN, VALUEIN, KEYOUT, VALUEOUT> extends Mapper<KEYIN, VALUEIN, KEYOUT, VALUEOUT> {
/** spring context support tools */
protected SpringContextSupport contextSupport;
...
public class Mapper<KEYIN, VALUEIN, KEYOUT, VALUEOUT> {