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

2V0-72.22 Professional Develop VMware Spring Questions and Answers

Questions 4

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

Options:

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.

Buy Now
Questions 5

Which two options are REST principles? (Choose two.)

Options:

A.

RESTful applications use a stateless architecture.

B.

RESTful application use HTTP headers and status codes as a contract with the clients.

C.

RESTful applications cannot use caching.

D.

RESTful application servers keep track of the client state.

E.

RESTful applications favor tight coupling between the clients and the servers.

Buy Now
Questions 6

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

Options:

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.

Buy Now
Questions 7

Refer to the exhibit.

How can a Spring Bean be created from this LegacySingleton class?

Options:

A.

Call LegacySingleton.getInstance() from within a @Bean method and return the instance.

B.

Return an instance of LegacySingleton using the new keyword from a @Bean method.

C.

It is not possible without modifying the LegacySingleton class, the constructor must be public.

D.

Modify the LegacySingleton class by adding the @Autowired annotation to the instance variable.

Buy Now
Questions 8

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

Options:

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.

Buy Now
Questions 9

Which two annotations indicate that the transaction for a transactional test method should be committed after the test method has completed? (Choose two.)

Options:

A.

@SqlMergeMode(false)

B.

@Rollback(false)

C.

@Commit

D.

@Sql(alwaysCommit=true)

E.

@Transactional(commit=true)

Buy Now
Questions 10

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

Options:

A.

EasyMock is supported out of the box.

B.

@SpringBootTest or @SpringJUnitConfig can be used for creating an ApplicationContext.

C.

Mockito spy is not supported in Spring Boot testing by default.

D.

The spring-test dependency provides annotations such as @Mock and @MockBean.

E.

Integration and slice testing are both supported.

Buy Now
Questions 11

Which following statements are true about Spring Data? (Choose two.)

Options:

A.

Spring Data implementations exist for many data storage types, such as MongoDB, Neo4j, and Redis.

B.

Spring Data works by applying the JPA annotations to data stores such as MongoDB, Neo4j, and Redis.

C.

Spring Data can greatly reduce the amount of “boilerplate” code typically needed for data access.

D.

Spring Data is specifically designed for JPA, JDBC, and relational database access only.

E.

Spring Data cannot be used together with Spring MVC.

Buy Now
Questions 12

Refer to the exhibit.

How can a response status code be set for No Content (204)? (Choose the best answer.)

Options:

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.

Buy Now
Questions 13

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

Options:

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 bean can be implicitly created by annotating the class with @Bean and using the component- scanner to scan its package.

D.

A Spring bean can be explicitly created using @Bean annotated methods within a Spring configuration class.

E.

A Spring bean can be explicitly created by annotating the class with @Autowired.

Buy Now
Questions 14

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

Options:

A.

Locale

B.

Principal

C.

Language

D.

Session

E.

Request

F.

HttpSession

Buy Now
Questions 15

Which strategy is correct for configuring Spring Security to intercept particular URLs? (Choose the best answer.)

Options:

A.

The URLs can be specified via configuration (using authorizeRequests () and request matchers), with the most specific rule first and the least specific last.

B.

Spring Security can obtain URLs from Spring MVC controllers, the Spring Security configuration just needs a reference to the controller to be protected.

C.

The URLs are specified in a special properties file, used by Spring Security.

D.

The URLs can be specified via configuration (using authorizeRequests () and request matchers), with the least specific rule first and the most specific last.

Buy Now
Questions 16

Which option is true about use of mocks in a Spring Boot web slice test? (Choose the best answer.)

Options:

A.

Mocking a Spring Bean requires annotating it with @MockBean annotation.

B.

If a Spring Bean already exists in the web slice test spring context, it cannot be mocked.

C.

Mocks cannot be used in a Spring Boot web slice test.

D.

Mocking a Spring Bean requires annotating it with @Mock annotation.

Buy Now
Questions 17

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

Options:

A.

REST is a Protocol.

B.

REST is Stateful.

C.

REST is Reliable.

D.

REST is Interoperable.

E.

REST is Relative.

Buy Now
Questions 18

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

Options:

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.

Buy Now
Questions 19

Which two statements are correct regarding the @EnableAutoConfiguration annotation? (Choose two.)

Options:

A.

It is a meta-annotation on the @SpringBootApplication composed annotation.

B.

It enables auto-configuration of the ApplicationContext by attempting to guess necessary beans.

C.

It is meta-annotation on the @SpringBootConfiguration composed annotation.

D.

It has the same effect regardless of the package of the class that is annotated with it.

E.

It ensures auto-configuration is applied before user-defined beans have been registered.

Buy Now
Questions 20

Refer to the exhibit.

Assume that the application is using Spring transaction management which uses Spring AOP internally.

Choose the statement that describes what is happening when the update1 method is called? (Choose the best answer.)

Options:

A.

There are 2 transactions because REQUIRES_NEW always runs in a new transaction.

B.

An exception is thrown as another transaction cannot be started within an existing transaction.

C.

There is only one transaction because REQUIRES_NEW will use an active transaction if one already exists.

D.

There is only one transaction initiated by update1() because the call to update2() does not go through the proxy.

Buy Now
Questions 21

Refer to the exhibit.

Which option is a valid way to retrieve the account id? (Choose the best answer.)

Options:

A.

Add @PathVariable(“id”) String accountId argument to the update() handler method.

B.

Add @PathVariable long accountId argument to the update() handler method.

C.

Add @RequestParam long accountId argument to the update() handler method.

D.

Add @RequestParam(“id”) String accountId argument to the update() handler method.

Buy Now
Questions 22

Which two statements are true regarding the RestTemplate class? (Choose two.)

Options:

A.

It supports asynchronous non-blocking model.

B.

It automatically supports sending and receiving Java objects.

C.

It provides convenience methods for writing REST clients.

D.

It provides convenience methods for writing REST services.

E.

Sending an HTTP request with a custom header is not possible when using RestTemplate.

Buy Now
Questions 23

Which two statements are true regarding @DataJpaTest? (Choose two.)

Options:

A.

TestEntityManager provides all methods that are provided by EntityManager and more.

B.

If an embedded database is on the classpath, it will be used to configure a DataSource by default.

C.

It can be used for testing both JPA components and NoSQL components.

D.

It auto-configures a TestEntityManager bean.

E.

It can be used for testing JdbcTemplate.

Buy Now
Exam Code: 2V0-72.22
Exam Name: Professional Develop VMware Spring
Last Update: Dec 3, 2024
Questions: 79
2V0-72.22 pdf

2V0-72.22 PDF

$29.75  $84.99
2V0-72.22 Engine

2V0-72.22 Testing Engine

$35  $99.99
2V0-72.22 PDF + Engine

2V0-72.22 PDF + Testing Engine

$47.25  $134.99