VMware
Spring Professional Develop
2V0-72.22
Prepare for the 2V0-72.22 exam to validate your skills in Spring Professional development.
192 questions
0 views
Free
Questions 51–60 of 192
You are configuring a Spring Boot application. What happens when you set a property to `spring.main.allow-bean-definition-overriding` to true?
-
A
Prevents bean overriding
-
B
Allows bean definition overriding
-
C
Forces application restart
-
D
Disables bean creation
Explanation
Setting it to true permits overriding existing bean definitions, while the other options misinterpret its function.
Which service enables container orchestration in Spring?
-
A
Spring Cloud Kubernetes
-
B
Spring Data JPA
-
C
Spring Security
-
D
Spring Batch
Explanation
Spring Cloud Kubernetes is designed for managing containers, while the others serve different purposes.
A company needs to secure their REST API. What is the best approach?
-
A
Rely on HTTP Basic Auth
-
B
Use Spring Security OAuth2
-
C
Disable SSL
-
D
Depend on API Gateway Only
Explanation
Spring Security OAuth2 provides robust security features, unlike the other options.
You are configuring a Spring Boot application with multiple data sources. What happens if you do not specify a primary data source?
-
A
Application will not start
-
B
Data sources will conflict
-
C
It uses the first data source
-
D
An error will occur on queries
Explanation
Without a primary data source defined, Spring uses the first one detected, which is valid.
Which service in Spring is responsible for dependency injection?
-
A
Spring IoC Container
-
B
Spring MVC
-
C
Spring Boot Starter
-
D
Spring AOP
Explanation
The Spring IoC Container handles dependency injection, while others serve different purposes.
A company needs to implement RESTful services, which Spring module should they primarily use?
-
A
Spring Web
-
B
Spring Data
-
C
Spring Security
-
D
Spring Batch
Explanation
Spring Web module is designed for building web applications and RESTful services.
What happens when a Spring bean is defined as 'singleton'?
-
A
Multiple instances per request
-
B
One instance per application context
-
C
One instance per class
-
D
Only in prototype scope
Explanation
A singleton-scoped bean creates one instance per application context, while other options misrepresent its behavior.
Which service is used for Spring Boot application deployment in a microservices architecture?
-
A
Spring Cloud
-
B
Spring Security
-
C
Spring Data
-
D
Spring AOP
Explanation
Spring Cloud provides the tools for deploying microservices seamlessly, while other options serve different specific functions.
A company needs to secure sensitive information in application properties. Which approach should they use?
-
A
Use plain text for properties
-
B
Encrypt sensitive properties
-
C
Store properties in a text file
-
D
Ignore security measures
Explanation
Encrypting sensitive properties enhances security, whereas the other options pose significant security risks.
You are configuring caching in a Spring application. What happens when the cache expires?
-
A
Data is automatically deleted
-
B
Data must be re-fetched
-
C
Cache remains valid
-
D
Cache is manually cleared
Explanation
When the cache expires, data must be re-fetched, unlike the other options which do not accurately describe cache behavior.