问题遇到的现象和发生背景
怎么获取PropertyUtils的实例,想让他走这个私有构造器,外面怎么调用
问题相关代码,请勿粘贴截图
public class PropertyUtils extends PropertyUtilsBase {
private PropertyUtils(){
this.init();
}
private static final PropertyUtilsBase propertyUtils = new PropertyUtils();
@Override
protected String getPropertiesFilePath() {
return "common.hadoop.properties";
}
}