如何将类值设置为弹簧豆属性?
嘿,使用类值设置豆的属性的最佳方法是什么?关于 XML 配置。对于像这样的豆子:
public class FilterJsonView extends MappingJacksonJsonView {
private Set<String> filteredAttributes;
private Class clazz;
public Set<String> getFilteredAttributes() {
return filteredAttributes;
}
public void setFilteredAttributes(Set<String> filteredAttributes) {
this.filteredAttributes = filteredAttributes;
}
public Class getClazz() {
return clazz;
}
public void setClazz(Class clazz) {
this.clazz = clazz;
}
}