Which of the following statements defines a "pointcut"? (select one)

Which of the following statements defines a "pointcut"? (select one)A . A point in the execution of a program such as a method call or field assignmentB . A module that encapsulates advicesC . An expression that selects one or more join pointsD . None of the aboveView AnswerAnswer: C

March 14, 2020 No Comments READ MORE +

Identify the correct statement about the following pointcut expression:

Identify the correct statement about the following pointcut expression: execution(@javax.annotation.security.RolesAllowed * rewards.restaurant.*.*(..)) (Select one)A . The return type of the target method is RolesAllowedB . All method parameters should be annotated with @RolesAllowedC . The target method may have one argumentD . All of the aboveView AnswerAnswer: C

March 14, 2020 No Comments READ MORE +

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)A . Ensure that you specify a valid bean name in the @Component annotationB . Ensure that...

March 13, 2020 No Comments READ MORE +

Which of the following statements about the @PostConstruct annotation is NOT true? (select one)

Which of the following statements about the @PostConstruct annotation is NOT true? (select one)A . It is a JSR-250 standard Java annotationB . There are no restrictions on method name or visibility of a method which can be annotated with @PostConstructC . It can be enabled using the <context:annotation-config />...

March 10, 2020 No Comments READ MORE +

Identify the correct statement(s) about the following pointcut expression:

Identify the correct statement(s) about the following pointcut expression: execution(* rewards.restaurant.*Service.find(..))A . The target's type should end with "Service"B . The target method name could be "findRestaurantById"C . The target method should have one argument onlyD . The target method may have several argumentsView AnswerAnswer: A,D

March 10, 2020 No Comments READ MORE +

In the example above, which statement is NOT true with regards to Spring Java configuration?

In the example above, which statement is NOT true with regards to Spring Java configuration? (select one) @Configuration public class AppConfig { @Bean public ClientService clientService() { ClientServiceImpl clientService = new ClientServiceImpl(); clientService.addClientDao(new ClientDao()); return clientService; }A . The declared bean is a singleton by defaultB . This bean might...

March 7, 2020 No Comments READ MORE +

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

Which of the following statements about the FactoryBean interface is NOT true? (select one)A . A FactoryBean can be used to generate Spring beans of any typeB . The Spring configuration <property name="someValue" ref="myFactoryBeanImpl"/> will ALWAYS inject the instance of the FactoryBean implementationC . FactoryBean is a Spring interfaceD ....

March 7, 2020 No Comments READ MORE +

Which statement is true about the two references returned?

Two beans of type MyBean are defined in the ApplicationContext with singleton scope, with ids "myBean1" and "myBean2". The getBean() method is called once for each bean. Which statement is true about the two references returned? (Select one)A . The two references refer to different instances of the same typeB...

March 7, 2020 No Comments READ MORE +

Identify the correct statement about the following pointcut expression. Assume that these 2 classes do not inherit from one another:

Identify the correct statement about the following pointcut expression. Assume that these 2 classes do not inherit from one another: Execution (* rewards.service.MyClass.*(..)) && execution(* rewards.service2.MyOtherClass.*(..)) (Select one)A . Executions of all public method calls in MyClass and MyOtherClass will be selected by this pointcutB . Public methods in MyClass...

March 5, 2020 No Comments READ MORE +

Select which statement is true with respect to constructor injection with Spring (select one)

Select which statement is true with respect to constructor injection with Spring (select one)A . Multiple parameters can be dependency injected into a constructorB . Using XML configuration, the constructor-arg element may be omitted if the constructor requires a single parameterC . One single bean cannot mix constructor injection with...

March 5, 2020 No Comments READ MORE +