SAP Hybris 辅助服务模块 (ASM) - 无法生成组件

SAP Hybris Assisted Service Module (ASM) - can't generate component

我已经在本地主机上成功安装并测试了 ASM(我们使用 Hybris 1811)。然后我想把它转移到我们的开发服务器上(实际上它只是 localextensions.xml 中的更改并重新生成 extensionsinfo.xml),所以在我店面的 extensionsinfo.xml 中有这样注册的插件:

<requires-extension name="assistedservicestorefront "/>

但它不会在视图中生成文件:

[DefaultCMSComponentRendererRegistry] Error processing component tag. currentComponent [AssistedServiceComponentModel (8796814312508@2)] exception: 
File [&#47;WEB-INF&#47;views&#47;responsive&#47;cms&#47;assistedservicecomponent.jsp] not found

我导入了与安装 ASM 手册(来自 help.hybris.com)和本地主机(cms-content.impex 以包含组件和 Jsp).

即使我 运行 在 HAC 中更新,我也尝试同步内容目录。我检查了 HAC 中的扩展,它包含与我本地机器上相同的 ASM 扩展:assistedservicefacadesassistedserviceservicesassistedservicestorefront。 当我检查后台时,具有该 ID 的组件确实存在并且在在线目录中。

如何生成这些文件?或者我应该以某种方式用我的自定义视图覆盖它们吗?但我认为这是一种糟糕的做法。

更新:我还尝试将此条目添加到我店面的 project.properties

sikob2cstorefront.additionalWebSpringConfigs.assistedservicestorefront=classpath\:/assistedservicestorefront/web/spring/assistedservicestorefront-web-spring.xml

但是我在加载 bean 时遇到错误:

Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultStorefrontTenantDefaultFilterChainList': Post-processing of FactoryBean's singleton object failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'AssistedservicestorefrontFilterListMergeDirective' defined in class path resource [assistedservicestorefront/web/spring/assistedservicestorefront-web-spring.xml]: Cannot resolve reference to bean 'assistedServiceFilter' while setting add; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'assistedServiceFilter' defined in class path resource [assistedservicestorefront/web/spring/assistedservicestorefront-web-spring.xml]: Cannot resolve reference to bean 'assistedServicePathRestrictionEvaluator' while setting bean property 'assistedServicePathRestrictionEvaluator'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'assistedServicePathRestrictionEvaluator' available
# Install assistedservicestorefront
# Replace Mystorefront with your storefront extension name
ant addoninstall -Daddonnames="assistedservicestorefront" -DaddonStorefront.yacceleratorstorefront="Mystorefront"

我认为您没有安装 assistedservicestorefront 插件,或者如果您已经安装,请检查您的服务器是否发生了以下更改。

addoninstall 命令进行以下更改

  • 将 assistedservicestorefront 添加到店面扩展 extensioninfo.xml 中

    喜欢 <requires-extension name="assistedservicestorefront "/>

  • 从 assistedservicestorefront 中的 project.properties.template 生成一个新的 project.properties 文件,其中有以下条目。

将下面的 yacceleratorstorefront 替换为您的店面扩展名称 属性。

#Specifies the location of the spring context file added automatically to the global platform application context.
assistedservicestorefront.application-context=assistedservicestorefront-spring.xml

yacceleratorstorefront.additionalWebSpringConfigs.assistedservicestorefront=classpath:/assistedservicestorefront/web/spring/assistedservicestorefront-web-spring.xml


assistedservicestorefront.javascript.paths.mobile=/responsive/common/js/assistedservicestorefront.js;/responsive/common/js/jquery.tablesorter.pager.js;/responsive/common/js/jquery.tablesorter.min.js;/responsive/common/js/Chart.min.js;/responsive/common/js/asm.storefinder.js
assistedservicestorefront.javascript.paths.responsive=/responsive/common/js/assistedservicestorefront.js;/responsive/common/js/jquery.tablesorter.pager.js;/responsive/common/js/jquery.tablesorter.min.js;/responsive/common/js/Chart.min.js;/responsive/common/js/asm.storefinder.js

assistedservicestorefront.css.paths.mobile=/responsive/common/css/assistedservicestorefront.css;/responsive/common/css/storeFinder.css;/responsive/common/css/customer360.css
assistedservicestorefront.css.paths.responsive=/responsive/common/css/assistedservicestorefront.css;/responsive/common/css/storeFinder.css;/responsive/common/css/customer360.css

assistedservicestorefront.redirect.customer_and_cart=/cart
assistedservicestorefront.redirect.customer_only=/my-account
assistedservicestorefront.redirect.error=/
assistedservicestorefront.redirect.order=/my-account/order/%s

assistedservicestorefront.deeplink.link=/assisted-service/emulate

cscokpit.assistedservice.deeplink=true
assistedservicestorefront.profile.cookie.name=profile.tracking.pause

#AIF AJAX call timeout in milliseconds
assistedservicestorefront.aif.timeout=7000

因此,如果您不想 运行 在每个环境中执行 addoninstall 命令,那么您可以手动执行这两个更改。您可以在插件中引用生成的 project.properties 文件并将所有这些属性复制到店面的 project.properties 或 local.properteis 文件并提交更改。