VMware Spring Professional Certification (2V0-72.22) — Questions and Answers
Question 1: What HTTP status does Spring Security return by default when an unauthenticated user accesses a protected resource?
- 401 Unauthorized
- 403 Forbidden
- 404 Not Found
- 302 Redirect to login (Correct answer)
Correct answer: 302 Redirect to login
By default, Spring Security redirects unauthenticated users to the login page (HTTP 302) rather than returning a 401 directly.
Question 2: What does the @Transactional annotation do when applied to a Spring test method?
- Disables transaction management for that test
- Rolls back the transaction after each test by default (Correct answer)
- Starts a new distributed transaction across services
- Commits the transaction after each test to persist data
Correct answer: Rolls back the transaction after each test by default
When @Transactional is applied to a Spring test, the transaction is rolled back after each test method by default, keeping the database clean.
Question 3: When configuring a Spring Boot application for HIPAA compliance, which approach best ensures PHI is never written to application logs?
- Disabling all Spring Boot Actuator endpoints
- Implementing a custom Logback filter that scrubs sensitive fields (Correct answer)
- Using @Transactional on all service methods
- Setting log level to ERROR globally
Correct answer: Implementing a custom Logback filter that scrubs sensitive fields
A custom Logback TurboFilter or Filter can intercept log events and redact or drop PHI fields before they are written to any appender.
Question 4: Which interface must be implemented to create a custom BeanPostProcessor in Spring?
- InitializingBean
- BeanPostProcessor (Correct answer)
- BeanFactory
- ApplicationListener
Correct answer: BeanPostProcessor
Implementing the BeanPostProcessor interface allows custom logic to be applied before and after a bean's initialization callbacks.
Question 5: Which Spring Data interface provides the minimum set of CRUD operations for a repository?
- PagingAndSortingRepository
- JpaRepository
- Repository
- CrudRepository (Correct answer)
Correct answer: CrudRepository
CrudRepository defines the core CRUD methods (save, findById, findAll, delete, count) that all Spring Data repositories can extend.
Question 6: How do Spring Framework professionals ensure compliance in daily practice?
- By integrating compliance requirements into standard operating procedures and regular audits (Correct answer)
- By hiring a compliance officer
- By memorizing all regulations
- Compliance is checked only annually
Correct answer: By integrating compliance requirements into standard operating procedures and regular audits
This is fundamental to Spring Framework practice. By integrating compliance requirements into standard operating procedures and regular audits represents the professional standard for regulatory in the Spring Framework certification framework.
Question 7: What does @Lazy do when applied to a Spring bean?
- Reduces the bean's memory footprint
- Creates a prototype-scoped bean
- Makes the bean thread-safe
- Delays bean initialization until it is first requested (Correct answer)
Correct answer: Delays bean initialization until it is first requested
@Lazy defers the creation of a singleton bean until it is first accessed rather than at container startup.
Question 8: Which Spring Boot Actuator endpoint exposes a structured health check that can be used as evidence of application readiness in CI/CD pipelines?
- /actuator/metrics
- /actuator/env
- /actuator/health (Correct answer)
- /actuator/info
Correct answer: /actuator/health
The /actuator/health endpoint returns a structured JSON report of application health indicators, commonly used as readiness/liveness probes in CI/CD and Kubernetes.
Question 9: What is the purpose of @Primary in Spring dependency injection?
- Marks a bean as the most important in the context
- Ensures a bean is initialized first
- Gives a bean higher thread priority
- Designates a bean as the default candidate when multiple beans of the same type exist (Correct answer)
Correct answer: Designates a bean as the default candidate when multiple beans of the same type exist
@Primary designates a bean as the preferred candidate for auto-wiring when multiple beans of the same type are present in the container.
Question 10: What are the ways to use Spring to access Hibernate?
- A and B (Correct answer)
- None of these
- Extending HibernateDAOSupport and Applying an AOP Interceptor node.
- Inversion of Control with a Hibernate Template and Callback.
Correct answer: A and B
Spring provides multiple ways to integrate with Hibernate. One common approach is to extend `HibernateDAOSupport`, which provides convenient methods for interacting with Hibernate `SessionFactory`. Another powerful method involves using `HibernateTemplate` (though now deprecated in favor of contextual sessions) with a `Callback` interface, or more generally, using Inversion of Control (IoC) to manage Hibernate `SessionFactory` and `Session` objects, often combined with AOP for transaction management.
Question 11: How should Spring Framework professionals handle conflicts with stakeholders?
- Avoid all conflict
- Escalate immediately to management
- Address issues professionally through active listening, finding common ground, and seeking resolution (Correct answer)
- Ignore stakeholder concerns
Correct answer: Address issues professionally through active listening, finding common ground, and seeking resolution
This is fundamental to Spring Framework practice. Address issues professionally through active listening, finding common ground, and seeking resolution represents the professional standard for communication in the Spring Framework certification framework.
Question 12: What is the importance of data security in Spring Framework digital applications?
- Security is unnecessary for professional data
- Security slows down work
- Protecting sensitive information from unauthorized access, breaches, and loss is essential (Correct answer)
- Only financial data needs protection
Correct answer: Protecting sensitive information from unauthorized access, breaches, and loss is essential
This is fundamental to Spring Framework practice. Protecting sensitive information from unauthorized access, breaches, and loss is essential represents the professional standard for technology in the Spring Framework certification framework.
Question 13: What Spring feature enables component scanning to detect annotated classes automatically?
- @EnableAutoConfiguration
- @BeanScan
- @EnableComponents
- @ComponentScan (Correct answer)
Correct answer: @ComponentScan
@ComponentScan tells Spring to scan specified packages for classes annotated with @Component, @Service, @Repository, and @Controller.
Question 14: Which Spring framework feature supports FedRAMP's requirement for continuous monitoring by exporting application metrics to an external monitoring system?
- Micrometer with a Prometheus or Datadog registry configured in Spring Boot Actuator (Correct answer)
- Spring AOP weaving at load time
- Spring Integration message history
- Spring Batch execution listeners
Correct answer: Micrometer with a Prometheus or Datadog registry configured in Spring Boot Actuator
Micrometer is Spring Boot Actuator's metrics facade; configuring a Prometheus or Datadog registry pushes runtime metrics to external monitoring platforms required by FedRAMP continuous monitoring.
Question 15: Which Spring annotation is used to read values from property files into fields?
- @PropertySource
- @ConfigValue
- @EnvVar
- @Value (Correct answer)
Correct answer: @Value
@Value injects values from properties files, environment variables, or Spring Expression Language (SpEL) expressions into bean fields.
Question 16: Which annotation is used in a Spring Data JPA repository interface to define a custom JPQL or native SQL query?
- @SQL
- @CustomQuery
- @NamedQuery
- @Query (Correct answer)
Correct answer: @Query
@Query allows you to define a custom JPQL or native SQL query directly on a repository method using its value or nativeQuery attributes.
Question 17: What is the ApplicationContext in Spring Framework?
- A configuration file parser
- A web request handler
- An advanced IoC container that adds enterprise features on top of BeanFactory (Correct answer)
- A database connection pool
Correct answer: An advanced IoC container that adds enterprise features on top of BeanFactory
ApplicationContext is Spring's advanced IoC container that extends BeanFactory with features like event publishing, i18n, and AOP integration.
Question 18: Which annotation marks a Java class as a JPA entity that can be persisted in a relational database?
- @Entity (Correct answer)
- @Component
- @Repository
- @Persistent
Correct answer: @Entity
@Entity designates a Java class as a JPA entity, mapping it to a database table for persistence.
Question 19: Which annotation enables Spring Security's method-level security?
- @EnableSecureMethods
- @EnableWebSecurity
- @EnableGlobalSecurity
- @EnableMethodSecurity (Correct answer)
Correct answer: @EnableMethodSecurity
@EnableMethodSecurity (Spring Security 5.6+) activates method-level annotations like @PreAuthorize, @PostAuthorize, and @Secured.
Question 20: A Spring Boot service must comply with CCPA and allow users to request deletion of their data. Which Spring Data feature simplifies implementing a 'right to be forgotten' endpoint?
- Spring Data REST's DELETE endpoint with @RepositoryRestResource
- CrudRepository.deleteById() exposed directly via REST
- Spring Batch job triggered per deletion request
- A custom service method calling repository delete operations wrapped in a saga pattern (Correct answer)
Correct answer: A custom service method calling repository delete operations wrapped in a saga pattern
A right-to-be-forgotten workflow typically spans multiple tables and services, so a transactional service method orchestrating multiple repository deletes (possibly with a saga for distributed systems) is the correct approach.
Question 21: How should Spring Framework professionals apply research findings to practice?
- Ignore research that contradicts experience
- Only follow systematic reviews
- Implement immediately without evaluation
- Critically evaluate applicability, adapt to context, and monitor outcomes (Correct answer)
Correct answer: Critically evaluate applicability, adapt to context, and monitor outcomes
This is fundamental to Spring Framework practice. Critically evaluate applicability, adapt to context, and monitor outcomes represents the professional standard for research in the Spring Framework certification framework.
Question 22: Which scope creates a new bean instance for every HTTP request?
- request (Correct answer)
- prototype
- session
- singleton
Correct answer: request
The 'request' scope creates a new bean instance for each HTTP request and is only valid in a web-aware Spring ApplicationContext.
Question 23: Which Mockito method call pattern is used to stub a method on a @MockBean to return a specific value?
- when(bean.method()).thenReturn(value) (Correct answer)
- Mockito.stub(bean.method()).toReturn(value)
- doReturn(value).when(bean, "method")
- bean.method().returns(value)
Correct answer: when(bean.method()).thenReturn(value)
Mockito's when().thenReturn() pattern stubs a method call on a mock to return a predefined value when invoked.
Question 24: What does the @GeneratedValue annotation configure when used alongside @Id in a JPA entity?
- The default value assigned to a column
- The sequence ordering of entity records
- The column name for the primary key
- The strategy used to generate primary key values (Correct answer)
Correct answer: The strategy used to generate primary key values
@GeneratedValue specifies the strategy (AUTO, IDENTITY, SEQUENCE, TABLE) used to automatically generate primary key values.
Question 25: What is the primary value of case study analysis in Spring Framework training?
- Developing critical thinking by applying theory to realistic professional scenarios (Correct answer)
- Replacing hands-on experience
- Memorizing specific outcomes
- Learning only from failures
Correct answer: Developing critical thinking by applying theory to realistic professional scenarios
This is fundamental to Spring Framework practice. Developing critical thinking by applying theory to realistic professional scenarios represents the professional standard for practical in the Spring Framework certification framework.
Question 26: How do Spring Framework professionals build trust with clients or stakeholders?
- Through consistent competence, transparency, reliability, and ethical behavior (Correct answer)
- Through marketing only
- By always agreeing with clients
- Through competitive pricing only
Correct answer: Through consistent competence, transparency, reliability, and ethical behavior
This is fundamental to Spring Framework practice. Through consistent competence, transparency, reliability, and ethical behavior represents the professional standard for communication in the Spring Framework certification framework.
Question 27: When documenting evidence for a Spring Security vulnerability patch, which Spring resource provides CVE details and recommended remediation versions?
- Stack Overflow accepted answers
- JavaDoc of the patched class only
- The official Spring Security CVE page at spring.io/security (Correct answer)
- Spring GitHub Discussions
Correct answer: The official Spring Security CVE page at spring.io/security
The official Spring security advisories page at spring.io/security publishes CVE identifiers, affected versions, and recommended upgrade paths as the authoritative evidence source.
Question 28: What is the most effective communication approach for Spring Framework professionals?
- Using technical language exclusively
- Only written communication
- Minimizing all communications
- Adapting communication style to the audience while maintaining accuracy and clarity (Correct answer)
Correct answer: Adapting communication style to the audience while maintaining accuracy and clarity
This is fundamental to Spring Framework practice. Adapting communication style to the audience while maintaining accuracy and clarity represents the professional standard for communication in the Spring Framework certification framework.
Question 29: How should an Spring Framework professional approach a novel situation not covered by standard procedures?
- Apply foundational principles, assess risks, consult resources, and document the rationale for decisions (Correct answer)
- Follow the closest standard procedure exactly
- Refuse to proceed
- Improvise without documentation
Correct answer: Apply foundational principles, assess risks, consult resources, and document the rationale for decisions
This is fundamental to Spring Framework practice. Apply foundational principles, assess risks, consult resources, and document the rationale for decisions represents the professional standard for practical in the Spring Framework certification framework.
Question 30: How do you specify the initialization method for a Spring bean in a @Bean definition?
- @Init("methodName")
- @Bean(initMethod="methodName") (Correct answer)
- @PostConstruct only
- @Bean(init="methodName")
Correct answer: @Bean(initMethod="methodName")
The initMethod attribute of @Bean specifies the name of the method to call after the bean is initialized by the container.
Question 31: In a Spring Boot integration test, what does setting webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT do?
- Starts an embedded server on a randomly chosen available port (Correct answer)
- Disables the web environment entirely
- Uses MockMvc instead of a real server
- Sets the port to 0 permanently in application.properties
Correct answer: Starts an embedded server on a randomly chosen available port
RANDOM_PORT starts a real embedded web server on a random available port, preventing port conflicts during parallel test execution.
VMware Spring Professional Certification (2V0-72.22)
The VMware Spring Professional certification validates a developer's practical knowledge of the Spring Framework and Spring Boot, including bean wiring, dependency injection, AOP, data management, testing, security, and Spring MVC. It is administered via Pearson VUE and is the industry-standard credential for Spring developers.
Exam Rules
- You can skip questions and return to them later
- Flag questions for review before submitting
- No feedback shown until you submit the entire exam
- Unanswered questions count as wrong — answer everything
- 10 pretest questions are mixed in and don't affect your score
- Timer auto-submits when time runs out
- Your progress is auto-saved every 30 seconds
These practice questions were written with AI tools. They are not real exam questions. Exam facts are checked against the official sources listed below. Not reviewed by a subject-matter expert. Editorial policy
Sources & references
Exam facts on this page (fees, format, dates, passing scores) are checked against these official sources; the date is our last check. Editorial policy
- docs.broadcom.com — Test delivery, retake policy, exam information · verified Oct 2026
- spring-academy.broadcom.com — Eligibility · verified Oct 2026
- broadcom.com — Fees, exam format, passing score, time limit · verified Oct 2026