0

除了 RMI/WEBDAV/JNDI,有没有办法远程连接 JCR/CRX(AEM)?不建议在 PROD 环境中打开 WEBDAV 和 RMI,因此尽管有可行的解决方案,但我不想走那条路。

探索的选项似乎不适合我的用例:

  1. SLING API - sling.apache.org/documentation/development/repository-based-development.html
  2. OAK API - github.com/davidegiannella/adaptTo16
  3. REST/JSON - adapt.to/2016/en/schedule/remote-resources.html。将适用于直接资源访问,但不适用于查询或 CRUD 操作。
  4. JCR API - http://experience-aem.blogspot.com/2015/05/aem-6-sp2-accessing-crx-remotely-using-jcr-remoting-davex.htmlhttps://wiki.apache.org /jackrabbit/远程访问

任何指针?

4

1 回答 1

1

鉴于 Apache Sling 非常擅长通过 HTTP 公开资源,我的第一个选择是使用Sling Get Servlet以 JSON 格式获取资源。

例如,访问http://localhost:8080/content.json将为您提供资源的 JSON 呈现在/content.

如果要获取更多数据,可以使用选择器指定要遍历层次结构的子级数量。http://localhost:8080/content.2.json将为您提供内容的属性以及子孙的属性。

如果这对您来说还不够,您可以随时创建自定义 servlet 并在那里执行渲染。

于 2016-12-21T09:49:19.473 回答