少年意气强不羁,虎胁插翼白日飞。这篇文章主要讲述自定义Spring ApplicationContext 支持动态订阅spring配置相关的知识,希望能为你提供帮助。
public class StringXmlApplicationContext extends AbstractXmlApplicationContext {
private Resource[] configResources;
【自定义Spring ApplicationContext 支持动态订阅spring配置】
public StringXmlApplicationContext(String stringXml) {
this(new String[] { stringXml }, null);
}
public StringXmlApplicationContext(String[] stringXmls) {
this(stringXmls, null);
}
public StringXmlApplicationContext(String[] stringXmls, ApplicationContext parent) {
super(parent);
this.configResources = new Resource[stringXmls.length];
for (int i = 0;
i <
stringXmls.length;
i++) {
this.configResources[i] = new ByteArrayResource(stringXmls[i].getBytes());
}
refresh();
}
protected Resource[] getConfigResources() {
return this.configResources;
}
public ClassLoader getClassLoader() {
return this.getClass().getClassLoader();
}
}
推荐阅读
- Android---Monkey指令进行压力测试实例(模拟点击)
- android studio NDK配置
- android 阿拉伯语下,图库中编辑运动轨迹图片,动画中会显示绿色的图片
- Android中makfile的随记
- android 插件加载机制之二
- Android 如何本地加载pdf文件
- RxAndroid+RxJava+Gson+retrofit+okhttp初步搭建android网络请求框架
- make: *** No rule to make target `out/target/common/obj/APPS/framework-res_intermediates/src/R.stamp
- Android 顶级视图 DecorView 的前世今生