cancel
Showing results for 
Search instead for 
Did you mean: 

How to override abstractPopulatingConverter?

Former Member
0 Kudos

Hi experts!!

I'm working with hybris 5.3. I'm trying to overide abstractPopulatingConverter. Spting declration:

 <alias  name="myPopulatingConverter"  alias="abstractPopulatingConverter"/>
     <bean id="myPopulatingConverter" class="com.myextension.populators.MyPopulatingConverter" abstract="true" />

Java class:

 public abstract class MyPopulatingConverter<SOURCE, TARGET> extends AbstractConverter<SOURCE, TARGET> implements
         PopulatorList<SOURCE, TARGET>
 {
 
     private static final Logger LOG = Logger.getLogger(MyPopulatingConverter.class);
 
     @Override
     public TARGET convert(final SOURCE source) throws ConversionException
     {
         LOG.info("Overriding test");
 
         return super.convert(source);
 
     }
 }
 

but when debugging it never enter to this method.

Note that this code works perfectly with hybris 5.2

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

The populator you are trying to override is probably appended to the Converter with its actual name instead of the alias like it should be. Try searching the hybris made -spring.xmls for the original definition and then find where its actual name is used. Same has happened to me earlier, just forgot which populator it was. You need to override the whole Converter definition to get it working.

Former Member
0 Kudos

The bean is always used with the same alias(abstractPopulatingConverter)