
SpringSource Core-Spring (based on Spring 3.2) - CoreSpringV3.2 Exam Questions
QUESTION NO: 1
If you annotate one of your classes with @Component, which of the following should you do to have Spring automatically detect your class and load it as a bean? (Select one or several answers)
If you annotate one of your classes with @Component, which of the following should you do to have Spring automatically detect your class and load it as a bean? (Select one or several answers)
Correct Answer: D
QUESTION NO: 2
Which of the following statements is NOT true about advice types (select one)
Which of the following statements is NOT true about advice types (select one)
Correct Answer: D
QUESTION NO: 3
Which of the following statement is true concerning Spring's JmsTemplate (select one)
Which of the following statement is true concerning Spring's JmsTemplate (select one)
Correct Answer: C
QUESTION NO: 4
ClientService service = applicationContext.getBean(ClientService.class)
Which statement is true with regards to the above example? (select one)
ClientService service = applicationContext.getBean(ClientService.class)
Which statement is true with regards to the above example? (select one)
Correct Answer: C
QUESTION NO: 5
Which of the following are valid mechanisms of autowiring a dependency when multiple beans match the dependency's type? (Select one or several answers)
Which of the following are valid mechanisms of autowiring a dependency when multiple beans match the dependency's type? (Select one or several answers)
Correct Answer: A,B
QUESTION NO: 6
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 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)
Correct Answer: B
QUESTION NO: 7
Select which of the following is a mechanism which can be used with Spring Security to store user details (select one)
Select which of the following is a mechanism which can be used with Spring Security to store user details (select one)
Correct Answer: A
QUESTION NO: 8
Assuming a web application context name of "rewardsonline", a servlet mapping of "/admin/*", and an incoming URL of "/rewarsdonline/admin/accounts/show", what is the URL used for Spring MVC request-mapping purposes? (select one)
Assuming a web application context name of "rewardsonline", a servlet mapping of "/admin/*", and an incoming URL of "/rewarsdonline/admin/accounts/show", what is the URL used for Spring MVC request-mapping purposes? (select one)
Correct Answer: C
QUESTION NO: 9
<bean name="clientService" class="com.foo.ClientServiceImpl" p:name="myName"/>
Which of the following statements is true regarding the above code sample? (Select one)
<bean name="clientService" class="com.foo.ClientServiceImpl" p:name="myName"/>
Which of the following statements is true regarding the above code sample? (Select one)
Correct Answer: A
QUESTION NO: 10
Which statement best describes the advantage of using AfterReturning advice, rather than simply using after advice? (Select one)
Which statement best describes the advantage of using AfterReturning advice, rather than simply using after advice? (Select one)
Correct Answer: A




