Winter Sale - Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: dpt65

2V0-72.22 Questions and Answers

Question # 6

What's the password storage format when using the DelegatingPasswordEncoder?

A.

encodedPassword{id}, where {id} is an identifier used to look up which PasswordEncoder should be used.

B.

{id}encodedPassword, where {id} is an identifier used to look up which PasswordEncoder should be used.

C.

{timestamp}encodedPassword, where {timestamp} is the time when the password was encoded.

D.

{id}{salt}encodedPassword, where {id} is an identifier used to look up which PasswordEncoder should be used and {salt} a randomly generated salt.

Full Access
Question # 7

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.

Configuration can be externalized and centralized in a small set of files.

E.

Dependency injection creates tight coupling between components.

F.

Dependency injection facilitates loose coupling between components.

Full Access
Question # 8

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 cannot return a void type, it must return a ResponseEntity type.

Full Access
Question # 9

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 timed.

D.

Custom metrics can be measured using Meter primitives such as Counter, Gauge, Timer, and DistributionSummary.

E.

A metric must be created with one or more tags.

Full Access
Question # 10

Which two statements are true about @Controller annotated classes? (Choose two.)

A.

The @Controller annotated classes can only render views.

B.

The classes are eligible for handling requests in Spring MVC.

C.

The classes must be annotated together with @EnableMvcMappings to be discovered via component scanning.

D.

@Controller is interchangeable with @RestController with no extra code changes for the methods inside the class.

E.

The @Controller annotation is a stereotype annotation like @Component.

Full Access
Question # 11

Which two statements describe the ApplicationContext correctly? (Choose two.)

A.

The ApplicationContext is the root interface for accessing the Spring container.

B.

The ApplicationContext lazy initializes beans by default.

C.

The ApplicationContext can be created in a test environment, web application, and in a standalone application.

D.

The ApplicationContext does not include all functionality of the BeanFactory.

E.

The ApplicationContext maintains singleton beans that are instantiated by the Spring runtime.

Full Access
Question # 12

Refer to the exhibit.

What is the id/name of the declared bean in this Java configuration class? (Choose the best answer.)

A.

clientServiceImpl (starting with lowercase “c”)

B.

clientServiceImpl (starting with uppercase “C”)

C.

clientService (starting with lowercase “c”)

D.

ClientService (starting with uppercase “C”)

Full Access
Question # 13

Refer to the exhibit.

Which two statements are correct regarding the HelloAutoConfig auto-configuration class when it is specified in the META-INF/spring.factories file? (Choose two.)

A.

A HelloService bean will be created from the helloService() method even if the

HelloService.class is not in the classpath.

B.

A HelloService bean will be created from the helloService() method only when there is no other

HelloService bean in the ApplicationContext.

C.

This auto-configuration class is used only when the HelloService.class is not on the classpath.

D.

This auto-configuration class is used only when the HelloService.class is on the classpath.

E.

A HelloService bean will be created from the helloService() method and will replace existing a

HelloService bean in the ApplicationContext.

Full Access
Question # 14

Which two statements are correct regarding the Actuator info endpoint? (Choose two.)

A.

It provides configuration options through which only an authenticated user can display application information.

B.

It is not enabled by default.

C.

It can be used to display arbitrary application information.

D.

It can be used to change a property value on a running application.

E.

Typically it is used to display build or source control information.

Full Access
Question # 15

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

A.

Locale

B.

Principal

C.

Language

D.

Session

E.

Request

F.

HttpSession

Full Access
Question # 16

Which two statements about the @Autowired annotation are true? (Choose two.)

A.

@Autowired fields are injected after any config methods are invoked.

B.

Multiple arguments can be injected into a single method using @Autowired.

C.

By default, if a dependency cannot be satisfied with @Autowired, Spring throws a RuntimeException.

D.

If @Autowired is used on a class, field injection is automatically performed for all dependencies.

E.

@Autowired can be used to inject references into BeanPostProcessor and

BeanFactoryPostProcessor.

Full Access
Question # 17

In which three ways are Security filters used in Spring Security? (Choose three.)

A.

To provide risk governance.

B.

To drive authentication.

C.

To manage application users.

D.

To provide a logout capability.

E.

To enforce authorization (access control).

F.

To encrypt data.

Full Access
Question # 18

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.

Spring provides abstractions over infrastructure such as persistence and messaging.

Full Access
Question # 19

Which two statements about BeanFactoryPostProcessors are true? (Choose two.)

A.

Allows for the transformation of Spring bean definitions after the beans have been instantiated.

B.

Allows for the transformation of Spring bean definitions before the beans are instantiated.

C.

Creates proxies for the Spring beans that require an extra behavior like transaction management.

D.

PropertySourcesPlaceholderConfigurer implements BeanFactoryPostProcessor and is used to read property values from the Spring Environment.

E.

Detects annotations such as @PostConstruct and @PreDestroy and then invokes appropriate behavior.

Full Access
Question # 20

Refer to the exhibit.

Which two statements are correct regarding auto-configuration of DataSource and JdbcTemplate beans given a Spring Boot application with only these two dependencies? (Choose two.)

A.

A DataSource bean will not be auto-configured.

B.

A JdbcTemplate bean will not be auto-configured.

C.

A JdbcTemplate bean will be auto-configured.

D.

A DataSource bean will be auto-configured only if a JdbcTemplate bean is explicitly defined.

E.

A DataSource bean will be auto-configured.

Full Access
Question # 21

Which two statements are correct regarding the Health Indicator status? (Choose two.)

A.

The last status in a sorted list of HealthIndicators is used to derive the final system health.

B.

The status with the least severity is used as the top-level status.

C.

Custom status values can be created.

D.

The built-in status values are DOWN, OUT_OF_SERVICE, UNKNOWN, and UP in decreasing order of severity.

E.

The severity order cannot be changed due to security reasons.

Full Access
Question # 22

Which two statements are correct regarding the Actuator loggers endpoint? (Choose two.)

A.

To get a logging level of a package called account.web, you can access the /actuator/loggers/account.web endpoint.

B.

An application restart is required to change the logging level of the package.

C.

In order to use the loggers endpoint, a logger implementation dependency needs to be added.

D.

The logging levels of a package that can be accessed via the loggers endpoint include configuredLevel and effectiveLevel.

Full Access
Question # 23

Which two annotations are meta-annotations on the @SpringBootApplication composed annotation? (Choose two.)

A.

@Configuration

B.

@ComponentScan

C.

@SpringBootConfiguration

D.

@SpringApplication

E.

@AutoConfiguration

Full Access