Which statement is true with regards to the above example? (select one)

Which statement is true with regards to the above example? (select one) ClientService service = applicationContext.getBean(ClientService.class)A . It returns the bean called "ClientService"B . It returns a bean of the type ClientService (regardless of its id or name)C . This syntax is not valid because the bean id must be...

March 5, 2020 No Comments READ MORE +

Which of the following statements defines an "aspect"? (select one)

Which of the following statements defines an "aspect"? (select one)A . An encapsulation of advice combined with a pointcut.B . A point in the execution of a program such as a method call or field assignmentC . An expression that selects one or more join pointsD . Code to be...

March 4, 2020 No Comments READ MORE +

The Spring Java configuration above is NOT correct. Why? (select one)

The Spring Java configuration above is NOT correct. Why? (select one) public class AppConfig { public ClientService clientService() { return new ClientServiceImpl(); } }A . The class should be annotated with @ConfigurationB . The method should be annotated with @BeanC . Both (a) and (b)D . Neither (a) or (b)View...

March 3, 2020 No Comments READ MORE +

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

Which of the following statements is true? (Select one) Consider the following complete configuration sample: <bean class="rewards.internal.RewardNetworkImpl"> <property name="accountRepository" ref="accountRepository"/> </bean> <bean class="rewards.internal.account.JdbcAccountRepository"/>A . This configuration is correctB . This configuration is not valid because the first bean should have an id. Its value should be "rewardNetwork".C . This configuration...

March 3, 2020 No Comments READ MORE +

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

When injecting scalar/literal values into Spring beans, which of the following statements is true? (select one)A . Scalar values cannot be injected into setters or constructors with primitive type parametersB . Spring performs automatic type conversion for certain data types, such as String to intC . In XML Spring configuration,...

March 2, 2020 No Comments READ MORE +

Which of the following statements about use of the @Transactional annotation in a JUnit integration test is NOT true? (Select one)

Which of the following statements about use of the @Transactional annotation in a JUnit integration test is NOT true? (Select one)A . Annotating a test with @Transactional will cause the test method to run in a transactionB . Annotating a test class with @Transactional will cause all its test methods...

March 2, 2020 No Comments READ MORE +

Which of those statements is true?

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)A . The use of the "file" prefix is...

March 1, 2020 No Comments READ MORE +

Which of the following statements is NOT true concerning Setter Injection or Constructor Injection? (Select one)

Which of the following statements is NOT true concerning Setter Injection or Constructor Injection? (Select one)A . Constructor injection is useful when you must have an instance of a dependency class before your component is usedB . Setter injection is useful if a component can provide its own defaultsC ....

February 29, 2020 No Comments READ MORE +

Which of the following statements is NOT true concerning the BeanPostProcessor Extension point? (Select one)

Which of the following statements is NOT true concerning the BeanPostProcessor Extension point? (Select one)A . BeanPostProcessors are called during the init phaseB . BeanPostProcessors are called after the dependencies have been injectedC . BeanPostProcessors are called before the BeanFactoryPostProcessors have been calledD . Custom BeanPostProcessors can be implementedView AnswerAnswer:...

February 28, 2020 No Comments READ MORE +

Identify which statement indicates potential advantages of using Spring's Dependency Injection (select one)

Identify which statement indicates potential advantages of using Spring's Dependency Injection (select one)A . Dependencies between application components can be managed external to the components themselvesB . Configuration can be externalized and centralized in a small set of filesC . Integration testing is made easier because different components used for...

February 28, 2020 No Comments READ MORE +