此代码片段应该获取 sling 中的页面属性。
为什么我收到此错误:请检查声明的类型是否正确
以及该方法是否存在。
private String properties;
public void setProperties(String properties){
this.properties = property;
ValueMap property = (ValueMap) properties.getAttribute("properties");
pageTitle = property.get("pageTitle", "");
}
最佳答案
properties
的类型为 String
,它没有您尝试访问的方法
关于java - 为什么我在检索 sling 的页面属性时收到 "check if the declared type is right and if the method exists"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16798882/