public class ConfigPropertySource extends PropertySource<Properties> implements PriorityOrdered, BeanFactoryPostProcessor, EnvironmentAware{

public void init() {
this.loadConfig();
this.env.getPropertySources().addFirst(this);
}

private Properties parseConfig(String config) {
Properties properties = new Properties();
if(StringUtils.isNotEmpty(config)) {
try {
properties.load(new StringReader(config));
} catch (Exception var4) {
throw new IllegalArgumentException("detail center parse config error, config:" + config, var4);
}
}

return properties;
}

public Object getProperty(String name) {
return this.source.get(name);
}

}

相关文章:

  • 2021-10-18
  • 2021-05-26
  • 2022-12-23
  • 2021-05-18
  • 2021-05-08
  • 2021-10-07
  • 2022-12-23
猜你喜欢
  • 2021-12-05
  • 2021-10-03
  • 2022-12-23
  • 2021-07-31
  • 2022-12-23
  • 2021-09-02
相关资源
相似解决方案