Which statement describes the @AfterReturning advice type? (Choose the best answer.)

Which statement describes the @AfterReturning advice type? (Choose the best answer.)A . The advice is invoked only if the method returns successfully but not if it throws an exception.B . The @AfterReturning advice allows behavior to be added after a method returns even if it throws an exception.C . The...

March 31, 2022 No Comments READ MORE +

Which two statements are true regarding Spring Boot Testing? (Choose two.)

Which two statements are true regarding Spring Boot Testing? (Choose two.)A . @TestApplicationContext is used to define additional beans or customizations for a test.B . Test methods in a @SpringBootTest class are transactional by default.C . @SpringBootTest is typically used for integration testing.D . Test methods annotated with @SpringBootTest will...

March 31, 2022 No Comments READ MORE +

What are the two reasons Spring be used to build a Java application? (Choose two.)

What are the two reasons Spring be used to build a Java application? (Choose two.)A . Spring automates a Java application build.B . Spring provides a Dependency Injection container.C . Spring automates deployment of Java applications to all of the major cloud providers.D . Spring provides comprehensive Java IDE support.E...

March 30, 2022 No Comments READ MORE +

How can a response status code be set for No Content (204)?

Refer to the exhibit. How can a response status code be set for No Content (204)? (Choose the best answer.)A . Annotate the update() handler method with @PutMapping(“/store/orders/{id”}”, HttpStatus.NO_CONTENT).B . Annotate the update() handler method with @ResponseStatus(HttpStatus.NO_CONTENT).C . Annotate the update() handler method with @ResponseEntity(204).D . The update() handler method...

March 30, 2022 No Comments READ MORE +

Which statement defines a pointcut? (Choose the best answer.)

Which statement defines a pointcut? (Choose the best answer.)A . A point in the execution of a program such as a method call or field assignment.B . An expression that selects one or more join points.C . A module that encapsulated advices.D . Code to be executed at each selected...

March 29, 2022 No Comments READ MORE +

Which three types can be used as @Controller method arguments? (Choose three.)

Which three types can be used as @Controller method arguments? (Choose three.)A . LocaleB . PrincipalC . LanguageD . SessionE . RequestF . HttpSessionView AnswerAnswer: A,E,F Explanation: Reference: https://docs.spring.io/spring-framework/docs/3.0.0.M4/spring-framework-reference/html/ch15s03.html

March 29, 2022 No Comments READ MORE +

Which three statements are advantages of using Spring’s Dependency Injection? (Choose three.)

Which three statements are advantages of using Spring’s Dependency Injection? (Choose three.)A . Dependency injection can make code easier to trace because it couples behavior with construction.B . Dependency injection reduces the start-up time of an application.C . Dependencies between application components can be managed external to the components.D ....

March 26, 2022 No Comments READ MORE +

Which two statements describe Spring JdbcTemplate? (Choose two.)

Which two statements describe Spring JdbcTemplate? (Choose two.)A . All JdbcTemplate methods throw SQLException which you are required to handle.B . The JdbcTemplate provides the ability to work with result sets.C . The JdbcTemplate can only perform update but not insert to the database.D . The JdbcTemplate provides methods for...

March 25, 2022 No Comments READ MORE +

Which two statements are true regarding bean creation? (Choose two.)

Which two statements are true regarding bean creation? (Choose two.)A . A Spring bean can be explicitly created by annotating methods or fields by @Autowired.B . A Spring bean can be implicitly created by annotating the class with @Component and using the component-scanner to scan its package.C . A Spring...

March 25, 2022 No Comments READ MORE +

Which two statements are correct regarding Spring Boot 2.x Actuator Metrics? (Choose two.)

Which two statements are correct regarding Spring Boot 2.x Actuator Metrics? (Choose two.)A . An external monitoring system must be used with Actuator.B . The metrics endpoint /actuator/metrics is exposed over HTTP by default.C . Timer measures both the number of timed events and the total time of all events...

March 24, 2022 No Comments READ MORE +