我试图在WCM IO中测试我的吊索映射,但似乎它们没有被采用:这就是我加载映射的方式:
context.load().json("/sample-content/sling-mappings/etc-map.json", "/etc/map");etc-map.json:
{
"jcr:primaryType": "sling:Folder",
"jcr:createdBy": "admin",
"hidden": "true",
"http": {
"jcr:primaryType": "sling:Folder",
"jcr:createdBy": "admin",
"mysite_be": {
"jcr:primaryType": "sling:Mapping",
"jcr:createdBy": "admin",
"sling:match": "mysite.be/nl/(.+)$",
"sling:internalRedirect": [
"/content/mysite/nl/$1"
],
"redirect": {
"jcr:primaryType": "sling:Mapping",
"jcr:createdBy": "admin",
"sling:match": "(.+)$",
"sling:internalRedirect": [
"/content/mysite/nl/$1"
]
}
}
}
}在resourceResolver上调试map方法:

我做错了什么?
注意:在我启动并运行的AEM环境中,当我在.../system/console/jcrresolver下尝试映射时,它们确实可以工作。
发布于 2018-06-07 18:21:00
我担心ResourceResolverMock并没有实现真正的资源映射。
尽情贡献吧。但老实说,我也从来没有(为我感到羞耻)。
https://stackoverflow.com/questions/50735573
复制相似问题