Consider the following class:
public class LegacySingleton {
private LegacySingleton(){}
public static LegacySingleton getAServiceInstance() {
return new LegacySingleton();
}
}
How can a bean of type LegacySingleton be created (using XML configuration)? (select one)
Consider the following code sample which creates an ApplicationContext from a file called "application-
config.xml" in the "rewards.internal" package, and a file called test-infra-config.xml in the current folder:
ApplicationContext context = new
FileSystemXmlApplicationContext("classpath:rewards.internal.application-config.xml", "file:test- infra-
config.xml");
Which of those statements is true? (select one)
You want to externalize constants from your Spring XML configuration file into a .properties file to your
Spring beans. Which mechanism could you use? (select one)