Я настроил пользовательскую горячую папку в SAP Commerce (hybris) с настраиваемым каналом ошибок, но я не могу заставить Spring вызвать мой пользовательский обработчик ошибок NviMediaErrorHandler
. Это настройка в файле hot-folder-spring. xml.
<!-- General set-up -->
<int:channel id="nviMediaErrorChannel"/>
<int:service-activator ref="nviMediaErrorHandler" input-channel="nviMediaErrorChannel" method="onError"/>
<bean id="nviMediaErrorHandler" class="com.nvi.core.data.hotfolder.media.task.ErrorHandler">
<property name="cleanupHelper" ref="nviMediaCleanupHelper"/>
</bean>
<bean id="nviMediaCleanupHelper" class="com.nvi.core.data.hotfolder.media.task.NviMediaCleanupHelper"/>
<bean id="mediaDirectoryNvi" class="java.lang.String">
<constructor-arg value="#{baseDirectory}/${tenantId}/nvi/media"/>
</bean>
<!-- Image file import process -->
<!-- 1) Scans a directory in a configurable interval and sends files to a configured channel -->
<file:inbound-channel-adapter id="mediaFilesNvi" directory="#{mediaDirectoryNvi}"
filename-regex="^\d+(_\d+)?\.(png|jpe?g)" comparator="fileOrderComparator"
prevent-duplicates="false">
<int:poller fixed-rate="1000"/>
</file:inbound-channel-adapter>
<!-- 2) Move file to processing/ directory and set up header -->
<file:outbound-gateway request-channel="mediaFilesNvi" reply-channel="mediaFilesNviProcess"
directory="#{mediaDirectoryNvi}/processing" delete-source-files="true"/>
<int:service-activator input-channel="mediaFilesNviProcess" output-channel="mediaHeaderSetup"
ref="mediaHeaderSetupTask" method="execute"/>
<bean id="mediaHeaderSetupTask" class="com.nvi.core.data.hotfolder.media.task.HeaderSetupTask">
<property name="catalogs">
<util:list id="catalogList" value-type="java.lang.String">
<value>ambestProductCatalog</value>
<value>egwProductCatalog</value>
<value>moProductCatalog</value>
<value>walmartProductCatalog</value>
</util:list>
</property>
</bean>
<!-- 3) Import image file -->
<int:service-activator input-channel="mediaHeaderSetup" output-channel="mediaFileImport"
ref="productImageImportTask" method="execute"/>
<bean id="productImageImportTask" class="com.nvi.core.data.hotfolder.media.task.ProductImageImportTask"/>
<!-- Clean up -->
<int:service-activator input-channel="mediaFileImport" ref="fileCleanupTask" method="execute"/>
<bean id="fileCleanupTask" class="com.nvi.core.data.hotfolder.media.task.CleanupTask">
<property name="cleanupHelper" ref="nviMediaCleanupHelper"/>
</bean>
Мне нужны ошибки для go в nviMediaErrorHandler
и, в частности, вызов com.nvi.core.data.hotfolder.media.task.ErrorHandler
, а не из SAP Commerce из коробки ErrorHandler
. Любая помощь приветствуется. Спасибо!