com.nepxion.discovery.plugin.configcenter.loader.LocalConfigLoader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of discovery-plugin-config-center Show documentation
Show all versions of discovery-plugin-config-center Show documentation
Nepxion Discovery is an enhancement for Spring Cloud Discovery
package com.nepxion.discovery.plugin.configcenter.loader;
/**
* Title: Nepxion Discovery
* Description: Nepxion Discovery
* Copyright: Copyright (c) 2017-2050
* Company: Nepxion
* @author Haojun Ren
* @version 1.0
*/
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import com.nepxion.discovery.plugin.framework.util.FileContextUtil;
public abstract class LocalConfigLoader implements ConfigLoader {
@Autowired
private ApplicationContext applicationContext;
@Override
public String getConfig() throws Exception {
String path = getPath();
return FileContextUtil.getText(applicationContext, path);
}
protected abstract String getPath();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy