DON'T WANT TO MISS A THING?

Certification Exam Passing Tips

Latest exam news and discount info

Curated and up-to-date by our experts

Yes, send me the newsletter

VMware 2V0-72.22 Exam Questions and Answers, Spring Certified Professional 2024 [v2] | SPOTO

SPOTO's latest exam dumps on the homepage, with a 100% pass rate! SPOTO delivers authentic Cisco CCNA, CCNP study materials, CCIE Lab solutions, PMP, CISA, CISM, AWS, and Palo Alto exam dumps. Our comprehensive study materials are meticulously aligned with the latest exam objectives. With a proven track record, we have enabled thousands of candidates worldwide to pass their IT certifications on their first attempt. Over the past 20+ years, SPOTO has successfully placed numerous IT professionals in Fortune 500 companies.

Take other online exams

Question #1
If a class is annotated with @Component, what should be done to have Spring automatically detect the annotated class and load it as a bean? (Choose the best answer.)
A. Ensure a valid bean name in the @Component annotation is specified
B. Ensure a valid @ComponentScan annotation in the Java configuration is specified
C. Ensure a valid @Scope for the class is specified
D. Ensure a valid @Bean for the class is specified
View answer
Correct Answer: A
Question #2
Which two options are REST principles? (Choose two.)
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
View answer
Correct Answer: AB
Question #3
Why is field-based dependency injection not recommended?
A. It hides the dependencies
B. Because it does not use Class-based Dependency Injection
C. Because it uses the Java Reflection API, which may adversely impact performance
D. It disallows final/immutable field declaration
View answer
Correct Answer: AD
Question #4
Using the default configurations, which methods will be affected when adding the @Transactional annotation to the class?
A. public methods
B. protected methods
C. private methods
D. @Transactional may be used only on methods
View answer
Correct Answer: A
Question #5
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
View answer
Correct Answer: AD
Question #6
Which two options are REST principles? (Choose two.)
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
View answer
Correct Answer: AB
Question #7
What are limitations of using the default JDK dynamic proxies in Spring AOP?
A. It cannot intercept constructor calls
B. Method calls inside the same class cannot be intercepted
C. There are less available pointcut designators
D. Only public interface method calls can be intercepted
E. All of the above
View answer
Correct Answer: E
Question #8
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.)
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
View answer
Correct Answer: D
Question #9
Which two options will inject the value of the daily.limit system property? (Choose two.)
A. @Value(“#{daily
B. @Value(“$(systemProperties
C. @Value(“$(daily
D. @Value(“#{systemProperties[‘daily
E. @Value(“#{systemProperties
View answer
Correct Answer: BD
Question #10
In a Spring test, which annotation can be used to mock a user?
A. @MockAuthentication
B. @WithMockUser
C. @Mock
D. @MockBean
View answer
Correct Answer: B
Question #11
Which two statements are true concerning constructor injection? (Choose two.)
A. If there is only one constructor the @Autowired annotation is not required
B. Constructor injection only allows one value to be injected
C. Constructor injection is preferred over field injection to support unit testing
D. Construction injection can be used with multiple constructors without @Autowired annotation
E. Field injection is preferred over constructor injection from a unit testing standpoint
View answer
Correct Answer: CE
Question #12
How can auditing be enabled for Spring Boot Actuator?
A. The @EnableAuditing annotation
B. Setting the property actuator
C. Declaring a bean of type AuditEventRepository
D. None of the above
View answer
Correct Answer: D
Question #13
When does the JdbcTemplate class acquire a database connection?
A. When one of its execute method is called
B. During JdbcTemplate instantiation
C. During application startup
D. None of the above
View answer
Correct Answer: D
Question #14
Given an ApplicationContext containing three bean definitions of type Foo with bean ids foo1, foo2, and foo3, which three @Autowired scenarios are valid and will allow the ApplicationContext to initialize successfully? (Choose three.)
A. @Autowired public void setFoo (Foo foo) {…}
B. @Autowired @Qualifier (“foo3”) Foo foo;
C. @Autowired public void setFoo (@Qualifier (“foo1”) Foo foo) {…}
D. @Autowired private Foo foo;
E. @Autowired private Foo foo2;
F. @Autowired public void setFoo(Foo foo2) {…}
View answer
Correct Answer: ADF
Question #15
Which option is true about use of mocks in a Spring Boot web slice test? (Choose the best answer.)
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
View answer
Correct Answer: A
Question #16
Which two options will inject the value of the daily.limit system property? (Choose two.)
A. @Value(“#{daily
B. @Value(“$(systemProperties
C. @Value(“$(daily
D. @Value(“#{systemProperties[‘daily
E. @Value(“#{systemProperties
View answer
Correct Answer: CD
Question #17
Which two statements are true regarding a Spring Boot-based Spring MVC application? (Choose two.)
A. The default embedded servlet container can be replaced with Undertow
B. Jetty is the default servlet container
C. Spring Boot starts up an embedded servlet container by default
D. The default port of the embedded servlet container is 8088
E. Spring MVC starts up an in-memory database by default
View answer
Correct Answer: BC
Question #18
Which option is true about use of mocks in a Spring Boot web slice test? (Choose the best answer.)
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
View answer
Correct Answer: A
Question #19
Which of the following transaction propagation behaviour will create a new transaction if one does not already exist?
A. SUPPORTS
B. MANDATORY
C. REQUIRED
D. NESTED
View answer
Correct Answer: CD
Question #20
Which two statements are true regarding Spring and Spring Boot Testing? (Choose two.)
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
View answer
Correct Answer: CD
Question #21
@EnableGlobalMethodSecurity is annotation used in Spring Security to secure which layer?
A. Web layer
B. Controller layer
C. Service layer
D. DAO layer
View answer
Correct Answer: C
Question #22
How can the Health Indicator status severity order be changed?
A. Using the @Primary annotation
B. Using the @Ordered annotation
C. It cannot be changed
D. Using the property management
View answer
Correct Answer: D
Question #23
Which functions are possible only when using interfaces as spring beans?
A. Exception Handling
B. JDK Dynamic Proxying
C. Test Application Context
D. Dependency Injection
View answer
Correct Answer: B
Question #24
If a class is annotated with @Component, what should be done to have Spring automatically detect the annotated class and load it as a bean? (Choose the best answer.)
A. Ensure a valid bean name in the @Component annotation is specified
B. Ensure a valid @ComponentScan annotation in the Java configuration is specified
C. Ensure a valid @Scope for the class is specified
D. Ensure a valid @Bean for the class is specified
View answer
Correct Answer: B

View The Updated Vmware Exam Questions

SPOTO Provides 100% Real Vmware Exam Questions for You to Pass Your Vmware Exam!

View Answers after Submission

Please submit your email and WhatsApp to get the answers of questions.

Note: Please make sure your email ID and Whatsapp are valid so that you can get the correct exam results.

Email:
Whatsapp/phone number: