How ContextLoaderListner loads XML file for Applic

2019-08-25 03:02发布

问题:

In Non-Webapplication, We use Classpath,fileSystem or other Implementations of ApplicationContext. In web app if we implement Java Configuration then we do it like this.

  @Override
public void onStartup(ServletContext servletCxt) {

    // Load Spring web application configuration
    AnnotationConfigWebApplicationContext ac = new AnnotationConfigWebApplicationContext();
    ac.register(AppConfig.class);
    ac.refresh();

But when we load Application context xml with ContextLoaderListner what is the implemention internaly.

I hope i made the point.