我在下面的路径中创建ValidateInterceptor
,在custombackoffice-backoffice-spring.xml
中创建bean
C:\hybris\bin\custom\custombackoffice\backoffice\src\com\custom\backoffice\interceptor\CustomAppeasementUserValidateInterceptor.java
bean如下所示
<bean id="customAppeasementUserValidateInterceptor" class="de.hybris.platform.servicelayer.interceptor.impl.InterceptorMapping">
<property name="interceptor" ref="customAppeasementUserValidateInterceptor" />
<property name="typeCode" value="Appeasement" />
</bean>
当我在后台修改特定模型并单击保存按钮时,调试器永远不会转到拦截器--它直接保存模型。
注意:-我不能在定制核心中编写这个拦截器,因为我们不能在自定义核心com.hybris.cockpitng.core.user.AuthorityGroupService;导入com.hybris.cockpitng.core.user.impl.AuthorityGroup;中导入下面的服务
为什么拦截器没有被触发?
发布于 2020-02-08 15:13:39
bean-id和mapper bean-id是相同的。随便换一个。理想情况下,应该是-
<bean id="customAppeasementUserValidateInterceptorMapping" class="de.hybris.platform.servicelayer.interceptor.impl.InterceptorMapping">
<property name="interceptor" ref="customAppeasementUserValidateInterceptor" />
<property name="typeCode" value="Appeasement" />
</bean>
注意映射bean的新id
,即customAppeasementUserValidateInterceptorMapping
。
https://stackoverflow.com/questions/60112313
复制相似问题