Free CoreSpringV3.2 Exam Braindumps (page: 3)

Page 2 of 25

Consider the following complete configuration sample:

<bean class="rewards.internal.RewardNetworkImpl">
<property name="accountRepository" ref="accountRepository"/>
</bean>
<bean class="rewards.internal.account.JdbcAccountRepository"/>

Which of the following statements is true? (Select one)

  1. This configuration is correct
  2. This configuration is not valid because the first bean should have an id. Its value should be "rewardNetwork".
  3. This configuration is not valid because the second bean should have an id. Its value should be "accountRepository".
  4. Both (b) and (c)

Answer(s): C



When injecting scalar/literal values into Spring beans, which of the following statements is true?
(select one)

  1. Scalar values cannot be injected into setters or constructors with primitive type parameters
  2. Spring performs automatic type conversion for certain data types, such as String to int
  3. In XML Spring configuration, you can inject scalar values using the ref attribute of the <property
    /> tag
  4. All of the above

Answer(s): B



Which of the following statements about the FactoryBean interface is NOT true? (select one)

  1. A FactoryBean can be used to generate Spring beans of any type
  2. The Spring configuration <property name="someValue" ref="myFactoryBeanImpl"/> will
    ALWAYS inject the instance of the FactoryBean implementation
  3. FactoryBean is a Spring interface
  4. Factory objects used in Spring do not necessarily have to implement the FactoryBean interface

Answer(s): B



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:testinfra-config.xml");

Which of those statements is true? (select one)

  1. The use of the "file" prefix is not necessary
  2. The use of the "classpath" prefix is not necessary
  3. The use of the "." separator is correct
  4. Both a and b

Answer(s): A






Post your Comments and Discuss SpringSource CoreSpringV3.2 exam with other Community members:

CoreSpringV3.2 Exam Discussions & Posts