0

I'm trying to override this bean which is provided by standard Hybris (OOTB) framework. I would love to override it so it uses my own custom class. Is this possible?

enter image description here

Vy Do
  • 46,709
  • 59
  • 215
  • 313
  • you can extend it and override the method, there are som many examples available in accelaratorservices-spring.xml, just search with this bean defaultHomePageSiteMapGenerator – Raushan Kumar Jan 07 '22 at 10:46

2 Answers2

0

You can create new extended abstract class but it is not used by existing classes. You can use customize functionality to overwrite class and/or spring config. Bu you must careful during patching or updating system. How to override hybris platform files other than customize

mkysoft
  • 5,392
  • 1
  • 21
  • 30
0

Do you want to inject a custom implementation for one of the properties mapped to the abstract bean definition or do you want the abstract bean to use a custom class that you provide?

The latter just doesnt work, because you would also break all configurations of implementing beans.

You should seek for all beans that use this abstract bean as a parent and think, which of those you want to change and change that. Most likely, those beans will have an alias defined that you can use to change it. :-)

Best Bechte