import com.broadleafcommerce.data.tracking.core.service.MutationNotifyEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;
@Component
public class MyMutationListener implements ApplicationListener<MutationNotifyEvent> {
@Override
public void onApplicationEvent(MutationNotifyEvent event) {
Trackable domain = event.getDomain();
ContextInfo context = event.getContext();
if (domain instanceof JpaProduct) {
// Handle product mutation
}
}
}