我真的很陌生,所以我提前致歉。我有一個簡單的腳本,我無法工作。我想要做的就是獲取位於JCR中的特定資源的「lastModified」屬性。吊索 - 獲取資源屬性
Resource getResource = resourceResolver.getResource("/content/AboutPage/jcr:content/list");
ValueMap properties = resource.adaptTo(ValueMap.class);
String lastModified = properties.get("jcr:lastModified", String.class);
相反,我得到的是下面的錯誤:
Duplicate local variable properties
任何幫助,不勝感激!謝謝!
使用合適的IDE進行編碼。它會捕獲語法錯誤。 – Roland