Summer Sale Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: ecus65

VMware 2V0-72.22 - Professional Develop VMware Spring

Page: 2 / 3
Total 79 questions

Refer to the exhibit.

It is a Java code fragment from a Spring application. Which statement is true with regard to the above example? (Choose the best answer.)

A.

This syntax is invalid because the result of the getBean() method call should be cast to ClientService.

B.

It will return a bean called ClientService regardless of its id or name.

C.

This syntax is invalid because the bean id must be specified as a method parameter.

D.

It will return a bean of the type ClientService regardless of its id or name.

Which two statements are true about Spring Boot and Spring Data JPA? (Choose two.)

A.

@EntityScan and spring.jpa.* properties can be used to customize Spring Data JPA.

B.

Any kind of Hibernate property can be passed to Spring Data JPA like spring.jpa.properties.xxx.

C.

Spring Data JPA is the only implementation for relational databases.

D.

Scanning of JPA Entities can not be customized, the whole classpath is scanned.

E.

Embedded Databases (H2, HSQLDB, Derby) are not re-created during the startup.

Which two statements are correct when @SpringBootApplication is annotated on a class? (Choose two.)

A.

It causes Spring Boot to enable auto-configuration by default.

B.

Component scanning will start from the package of the class.

C.

All other annotations on the class will be ignored.

D.

Methods in the class annotated with @Bean will be ignored.

E.

A separate ApplicationContext will be created for each class annotated with

@SpringBootApplication.

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

A.

Access control can be configured at the method level.

B.

A special Java Authentication and Authorization Service (JAAS) policy file needs to be configured.

C.

Authentication data can be accessed using a variety of different mechanisms, including databases and LDAP.

D.

In the authorization configuration, the usage of permitAll () allows bypassing Spring security completely.

E.

It provides a strict implementation of the Java EE Security specification.

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.

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 advice has complete control over the method invocation; it could even prevent the method from being called at all.

D.

Typically used to prevent any exception, thrown by the advised method, from propagating up the call-stack.

Spring puts each bean instance in a scope. What is the default scope? (Choose the best answer.)

A.

prototype

B.

singleton

C.

request

D.

session

Which two statements are true concerning the BeanPostProcessor Extension point? (Choose two.)

A.

BeanPostProcessors are called before the dependencies have been injected.

B.

Custom BeanPostProcessors can be implemented for Spring applications.

C.

BeanPostProcessors are called before the BeanFactoryPostProcessors.

D.

BeanPostProcessors are called during the initialization phase of a bean life cycle.

E.

BeanPostProcessors cannot be ordered in a Spring Boot application.

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 recreate the ApplicationContext.

E.

@SpringBootTest without any configuration classes expects there is only one class annotated with @SpringBootConfiguration in the application.

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.