@Override
public void start() throws Exception {
if(!isStarted()){
LOG.info("Creating Spring context " + StringUtils.join(this.fileLocs, ","));
if (parentSpringResourceLoader != null && parentContext != null) {
throw new ConfigurationException("Both a parentSpringResourceLoader and parentContext were defined. Only one can be defined!");
}
if (parentSpringResourceLoader != null) {
parentContext = parentSpringResourceLoader.getContext();
}
if (servletContextcontext != null) {
XmlWebApplicationContext lContext = new XmlWebApplicationContext();
lContext.setServletContext(servletContextcontext);
lContext.setParent(parentContext);
lContext.setConfigLocations(this.fileLocs.toArray(new String[] {}));
lContext.refresh();
context = lContext;
} else {
this.context = new ClassPathXmlApplicationContext(this.fileLocs.toArray(new String[] {}), parentContext);
}
super.start();
}
}
SpringResourceLoader.java 文件源码
java
阅读 18
收藏 0
点赞 0
评论 0
项目:kc-rice
作者:
评论列表
文章目录