October 2017
Intermediate to advanced
396 pages
10h 2m
English
Spring provides multiple implementations of ApplicationContext to load the various styles of configuration file. These are listed next:
ApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);
ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
In the preceding codes, Spring loads the Java configuration files by using the AnnotationConfigApplicationContext class, and the XML configuration files by using the ClassPathXmlApplicationContext class for the Spring container. Spring behaves the same for all types of ...
Read now
Unlock full access