Skip to main content

Posts

Showing posts with the label jackson

Why isn"t spring using my constructor to init this bean (Map parameter)

I have a spring beans configuration file where I define the following jackson classes as spring beans. For some reason on run-time the filterProvider bean is instantiated without the map argument. You can see from the docs that the SimpleFilterProvider does have such a constructor and that SimpleBeanPropertyFilter implements BeanPropertyFilter . <bean id="productAttributesAndAdvertiserNameFilter" class="org.codehaus.jackson.map.ser.impl.SimpleBeanPropertyFilter" factory-method="filterOutAllExcept"> <constructor-arg value="name"/> </bean> <bean id="offerIdFilter" class="org.codehaus.jackson.map.ser.impl.SimpleBeanPropertyFilter" factory-method="filterOutAllExcept"> <constructor-arg value="id"/> </bean> <bean id="filterProvider" class="org.codehaus.jackson.map.ser.impl.SimpleFilterProvider"> <