use of io.nuls.core.utils.spring.lite.core.ModularServiceMethodInterceptor in project nuls by nuls-io.
the class MicroKernelBootstrap method init.
@Override
public void init() {
try {
NulsContext.NULS_CONFIG = ConfigLoader.loadIni(NulsConstant.USER_CONFIG_FILE);
NulsContext.MODULES_CONFIG = ConfigLoader.loadIni(NulsConstant.MODULES_CONFIG_FILE);
} catch (IOException e) {
Log.error("Client start failed", e);
throw new NulsRuntimeException(ErrorCode.FAILED, "Client start failed");
}
// set system language
try {
NulsContext.DEFAULT_ENCODING = NulsContext.NULS_CONFIG.getCfgValue(NulsConstant.CFG_SYSTEM_SECTION, NulsConstant.CFG_SYSTEM_DEFAULT_ENCODING);
String language = NulsContext.NULS_CONFIG.getCfgValue(NulsConstant.CFG_SYSTEM_SECTION, NulsConstant.CFG_SYSTEM_LANGUAGE);
I18nUtils.setLanguage(language);
} catch (NulsException e) {
Log.error(e);
}
SpringLiteContext.init("io.nuls", new ModularServiceMethodInterceptor());
try {
VersionManager.start();
} catch (NulsException e) {
Log.error(e);
}
}
Aggregations