VMware Spring Professional Certification (2V0-72.22) — Questions and Answers
Question 1: A Spring Boot app exposes a REST endpoint that must return data within 200ms. Profiling shows JPA queries are slow. What is the first optimization step?
- Analyze generated SQL using spring.jpa.show-sql and add missing indexes (Correct answer)
- Enable Hibernate second-level cache and query cache
- Switch from JPA to plain JDBC
- Add @Cacheable to the service method
Correct answer: Analyze generated SQL using spring.jpa.show-sql and add missing indexes
Identifying slow queries with show-sql and fixing missing indexes addresses the root cause before introducing caching complexity.
Question 2: What is the purpose of Spring Security's SecurityContextHolder?
- Manages database connection security
- Holds SSL certificate information
- Caches security configuration settings
- Stores the currently authenticated user's details throughout a request (Correct answer)
Correct answer: Stores the currently authenticated user's details throughout a request
SecurityContextHolder stores the SecurityContext (which contains the Authentication object) for the current thread, making the user's identity available throughout the request lifecycle.
Question 3: Which element is used to specify bean method access attributes?
- none of above
- securityzintercept
- securityzintercept-security
- securityzprotect (Correct answer)
Correct answer: securityzprotect
In Spring Security, the `<security:protect>` element (or `@Secured` annotation) is used to define access control attributes for specific methods of a bean. This allows you to specify roles or permissions required to invoke those methods, enforcing security at the method level. It's a key component for securing application services.
Question 4: How do you specify the initialization method for a Spring bean in a @Bean definition?
- @Bean(init="methodName")
- @PostConstruct only
- @Init("methodName")
- @Bean(initMethod="methodName") (Correct answer)
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 5: Spring's documented 'fail-fast' principle recommends which behavior when required configuration properties are missing at startup?
- Throw a startup exception before the application accepts traffic (Correct answer)
- Log a warning and continue with null values
- Fall back to hardcoded defaults silently
- Prompt the user on the console for the missing value
Correct answer: Throw a startup exception before the application accepts traffic
The fail-fast principle, implemented via @ConfigurationProperties validation with @NotNull/@NotEmpty, causes Spring Boot to throw a BindException at startup, preventing a misconfigured app from serving traffic.
Question 6: Which Spring component is responsible for translating HTTP requests into handler method invocations?
- DispatcherServlet
- HandlerMapping
- ViewResolver
- HandlerAdapter (Correct answer)
Correct answer: HandlerAdapter
HandlerAdapter bridges the DispatcherServlet to specific handler types, invoking the correct method with resolved arguments and return value processing.
Question 7: What does the @Transactional annotation do when applied to a Spring test method?
- Commits the transaction after each test to persist data
- Starts a new distributed transaction across services
- Disables transaction management for that test
- Rolls back the transaction after each test by default (Correct answer)
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 8: Dependent injection, often known as IOC, is a.. .
- Java Module
- Framework
- Design Pattern (Correct answer)
- ORM Framework
Correct answer: Design Pattern
Dependency Injection (DI), often referred to as a specific implementation of Inversion of Control (IoC), is a fundamental design pattern in software engineering. It promotes loose coupling by allowing an object's dependencies to be provided or 'injected' externally, rather than the object creating them itself, which enhances modularity, testability, and maintainability of code.
Question 9: In Spring, which annotation marks a method to run before each test method in a JUnit 5 test class?
- @Before
- @Init
- @BeforeEach (Correct answer)
- @Setup
Correct answer: @BeforeEach
JUnit 5 uses @BeforeEach (not JUnit 4's @Before) to annotate setup methods that run before each individual test.
Question 10: Which annotation in Spring Boot Test is used to auto-configure a TestRestTemplate for full integration tests?
- @RestClientTest
- @DataJpaTest
- @SpringBootTest with webEnvironment = RANDOM_PORT (Correct answer)
- @WebMvcTest
Correct answer: @SpringBootTest with webEnvironment = RANDOM_PORT
When @SpringBootTest uses RANDOM_PORT or DEFINED_PORT, Spring Boot auto-configures a TestRestTemplate bean for HTTP client testing.
Question 11: Which Spring annotation marks a method to be executed repeatedly on a fixed schedule?
- @Timed
- @Async
- @Repeatable
- @Scheduled (Correct answer)
Correct answer: @Scheduled
@Scheduled, combined with @EnableScheduling, allows Spring to trigger a method at fixed rates, fixed delays, or cron expressions.
Question 12: In Spring, what are the IoC containers?
- BeanFactory, BeanContext, IocContextFactory
- BeanFactory, ApplicationContext, BeanContext
- BeanFactory, ApplicationContext (Correct answer)
- BeanFactory, ApplicationContext, IocContextFactory
Correct answer: BeanFactory, ApplicationContext
In Spring, the primary Inversion of Control (IoC) containers are the BeanFactory and the ApplicationContext. The BeanFactory provides the basic functionality for managing beans, while the ApplicationContext is an enhanced version that builds upon BeanFactory, offering additional enterprise-specific features like internationalization, event publishing, and declarative transaction management.
Question 13: A Spring team's on-call rotation lacks documentation. A new team member is on call for the first time. Which gap is most critical to address before their shift?
- Giving them access to production only
- Providing an escalation contact list, service runbooks, and alert context documentation (Correct answer)
- Assigning a buddy without any written resources
- Sharing the team's coffee preferences
Correct answer: Providing an escalation contact list, service runbooks, and alert context documentation
Escalation contacts, runbooks, and alert context are the minimum documentation needed for an on-call shift to be manageable.
Question 14: A Spring Boot service behind an API gateway must propagate trace IDs across HTTP calls to downstream services. Which library integrates with Spring automatically?
- Log4j MDC configured manually in each service
- Spring Cloud Sleuth (or Micrometer Tracing in Spring Boot 3) (Correct answer)
- Logback with a custom appender
- A custom Servlet Filter that copies the X-Trace-Id header
Correct answer: Spring Cloud Sleuth (or Micrometer Tracing in Spring Boot 3)
Spring Cloud Sleuth / Micrometer Tracing auto-instruments RestTemplate, WebClient, and messaging to propagate trace and span IDs without manual coding.
Question 15: Which Spring Security feature directly reduces the risk of clickjacking attacks?
- Using BCrypt for password hashing with a high work factor
- Enabling CSRF token validation on all state-changing endpoints
- Configuring X-Frame-Options or Content-Security-Policy frame-ancestors via headers (Correct answer)
- Requiring HTTPS via HttpSecurity's requiresChannel() configuration
Correct answer: Configuring X-Frame-Options or Content-Security-Policy frame-ancestors via headers
X-Frame-Options: DENY or CSP frame-ancestors 'none' prevents the page from being embedded in iframes used by clickjacking attacks.
Question 16: Which interface must be implemented to create a custom BeanPostProcessor in Spring?
- ApplicationListener
- InitializingBean
- BeanFactory
- BeanPostProcessor (Correct answer)
Correct answer: BeanPostProcessor
Implementing the BeanPostProcessor interface allows custom logic to be applied before and after a bean's initialization callbacks.
Question 17: Which JPA annotation defines a named query at the entity class level that can be referenced by name in repository methods?
- @Query
- @NamedQuery (Correct answer)
- @PredefinedQuery
- @EntityQuery
Correct answer: @NamedQuery
@NamedQuery is placed on an entity class to define a static, pre-compiled JPQL query identified by a name for later reference.
Question 18: In Spring, what is the difference between constructor injection and setter injection?
- Constructor injection enforces mandatory dependencies at creation time; setter injection allows optional wiring (Correct answer)
- There is no functional difference between the two
- Setter injection creates immutable objects; constructor injection does not
- Constructor injection supports optional dependencies; setter injection does not
Correct answer: Constructor injection enforces mandatory dependencies at creation time; setter injection allows optional wiring
Constructor injection makes dependencies mandatory and supports immutability, while setter injection is used for optional dependencies that can be changed after object creation.
Question 19: Which annotation is used to inject dependencies in Spring?
- @Resource
- @Inject
- @Value
- @Autowired (Correct answer)
Correct answer: @Autowired
@Autowired is Spring's annotation for automatic dependency injection by type into fields, constructors, or setter methods.
Question 20: What additional capabilities does JpaRepository provide beyond those in PagingAndSortingRepository?
- Support for derived query methods
- JPA-specific operations like flush(), saveAllAndFlush(), and deleteAllInBatch() (Correct answer)
- Built-in caching and second-level cache support
- Automatic transaction management for all methods
Correct answer: JPA-specific operations like flush(), saveAllAndFlush(), and deleteAllInBatch()
JpaRepository extends PagingAndSortingRepository and adds JPA-specific methods such as flush(), saveAllAndFlush(), deleteAllInBatch(), and getReferenceById().
Question 21: A Spring application is being deprecated in favor of a new service. What communication timeline practice is considered best?
- Shut it down quietly and redirect traffic
- Announce deprecation on the day the service is shut down
- Let consumers figure out the migration on their own
- Announce deprecation early, provide migration guides, set a firm EOL date, and send reminder notifications as the date approaches (Correct answer)
Correct answer: Announce deprecation early, provide migration guides, set a firm EOL date, and send reminder notifications as the date approaches
Early announcement with migration resources and reminder milestones gives consumers time to migrate without emergency scrambles.
Question 22: What distinguishes a peer-reviewed study in Spring Framework literature?
- It was published quickly
- It was written by multiple authors
- It was published in any format
- Independent experts in the field evaluated the methodology and conclusions before publication (Correct answer)
Correct answer: Independent experts in the field evaluated the methodology and conclusions before publication
This is fundamental to Spring Framework practice. Independent experts in the field evaluated the methodology and conclusions before publication represents the professional standard for research in the Spring Framework certification framework.
Question 23: What is the primary purpose of the @Version annotation in a JPA entity?
- To record the timestamp of the entity's last modification
- To implement optimistic locking by tracking a version field that JPA increments on each update (Correct answer)
- To enable versioned caching so the second-level cache can detect stale entries
- To specify which version of the JPA specification the entity targets
Correct answer: To implement optimistic locking by tracking a version field that JPA increments on each update
@Version designates a field as the optimistic locking version counter; JPA increments it on each update and throws OptimisticLockException if concurrent modifications are detected.
Question 24: What does @Lazy do when applied to a Spring bean?
- Creates a prototype-scoped bean
- Reduces the bean's memory footprint
- 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 25: Which Spring Cloud project provides distributed tracing integrated with Zipkin or Brave?
- Spring Cloud Gateway
- Spring Cloud Sleuth (Correct answer)
- Spring Cloud Config
- Spring Cloud Bus
Correct answer: Spring Cloud Sleuth
Spring Cloud Sleuth instruments your application with trace and span IDs that are automatically propagated through logs and HTTP headers for distributed tracing.
Question 26: Which Spring Cloud Gateway filter can enforce rate limiting per authenticated user identity to comply with API usage policies under enterprise governance frameworks?
- SetResponseHeader filter
- RewritePath filter
- RequestRateLimiter filter using Redis and a KeyResolver based on the authenticated principal (Correct answer)
- CircuitBreaker filter with Resilience4J
Correct answer: RequestRateLimiter filter using Redis and a KeyResolver based on the authenticated principal
Spring Cloud Gateway's RequestRateLimiter filter uses a Redis-backed token bucket algorithm, and a custom KeyResolver can extract the principal name from the SecurityContext to rate-limit per user.
Question 27: What does the cascade attribute on a JPA relationship annotation (e.g., @OneToMany) control?
- The order in which child entities are loaded from the database
- The foreign key column name generated in the child table
- Which EntityManager lifecycle operations (persist, merge, remove, etc.) propagate from the parent to child entities (Correct answer)
- The maximum depth of nested entity graphs that can be traversed
Correct answer: Which EntityManager lifecycle operations (persist, merge, remove, etc.) propagate from the parent to child entities
The cascade attribute determines which JPA lifecycle operations on the parent entity (such as PERSIST, MERGE, REMOVE) are automatically applied to its associated child entities.
Question 28: What Spring feature enables component scanning to detect annotated classes automatically?
- @EnableComponents
- @ComponentScan (Correct answer)
- @EnableAutoConfiguration
- @BeanScan
Correct answer: @ComponentScan
@ComponentScan tells Spring to scan specified packages for classes annotated with @Component, @Service, @Repository, and @Controller.
Question 29: In a Spring Boot test, what is the recommended way to test exception handling in a REST controller using MockMvc?
- Use .andExpect(status().is4xxClientError()) or specific status matchers after triggering the error condition (Correct answer)
- Wrap the perform() call in a try-catch block
- Annotate the test with @ExpectedException
- Use assertThrows() from JUnit 5 around the controller method call
Correct answer: Use .andExpect(status().is4xxClientError()) or specific status matchers after triggering the error condition
MockMvc's result matchers like status().isBadRequest() or status().isInternalServerError() assert the HTTP error response returned by exception handlers.
Question 30: A Spring team is distributed across three time zones. Which strategy best maintains effective daily communication?
- Use async-first tools like recorded demos, written updates, and overlap-window syncs (Correct answer)
- Communicate only via email with 48-hour response SLAs
- Require all team members to work the same shift
- Hold all meetings at the US headquarters time zone regardless
Correct answer: Use async-first tools like recorded demos, written updates, and overlap-window syncs
Async-first communication with minimal overlap syncs respects all time zones while keeping information flowing.
Question 31: What does the @GeneratedValue annotation configure when used alongside @Id in a JPA entity?
- The sequence ordering of entity records
- The column name for the primary key
- The default value assigned to a column
- 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 32: How should Spring Framework professionals handle conflicts with stakeholders?
- Escalate immediately to management
- Address issues professionally through active listening, finding common ground, and seeking resolution (Correct answer)
- Avoid all conflict
- 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 33: In Spring Data JPA, what does the @Query annotation allow you to do?
- Define a custom JPQL or native SQL query directly on a repository method (Correct answer)
- Enable query caching for a repository
- Map query results to a DTO automatically
- Validate query results against a schema
Correct answer: Define a custom JPQL or native SQL query directly on a repository method
@Query lets you write a custom JPQL or native SQL query on a repository method, overriding the derived query mechanism.
Question 34: What professional practice should be followed when externalizing configuration in a Spring Boot application?
- Use application.properties or application.yml with @ConfigurationProperties (Correct answer)
- Embed config in @Bean method bodies
- Hard-code values in @Configuration classes
- Store config in a static utility class
Correct answer: Use application.properties or application.yml with @ConfigurationProperties
@ConfigurationProperties bound to application.properties/yml provides type-safe, testable externalized configuration.
Question 35: What annotation is used to register a method's return value as a Spring bean in a @Configuration class?
- @Managed
- @Component
- @Bean (Correct answer)
- @Register
Correct answer: @Bean
@Bean is placed on methods inside @Configuration classes to indicate that the returned object should be registered as a bean in the Spring application context.
Question 36: A stakeholder escalates a production issue directly to your Spring team, bypassing the incident management process. How should you respond?
- Escalate back to the stakeholder's manager
- Ignore the escalation since it bypassed process
- Acknowledge the concern, loop in the incident manager, and direct future escalations through the proper channel (Correct answer)
- Fix the issue silently without updating the incident ticket
Correct answer: Acknowledge the concern, loop in the incident manager, and direct future escalations through the proper channel
Acknowledging the concern while restoring process integrity addresses the immediate relationship and long-term communication hygiene.
Question 37: 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 Batch job triggered per deletion request
- A custom service method calling repository delete operations wrapped in a saga pattern (Correct answer)
- CrudRepository.deleteById() exposed directly via REST
- Spring Data REST's DELETE endpoint with @RepositoryRestResource
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 38: Which annotation is used in a Spring configuration class to enable scanning for Spring Data JPA repositories?
- @EnableDataRepositories
- @JpaRepositoriesScan
- @ScanJpaRepositories
- @EnableJpaRepositories (Correct answer)
Correct answer: @EnableJpaRepositories
@EnableJpaRepositories triggers component scanning for interfaces extending Spring Data JPA repository types and creates their bean implementations.
Question 39: You observe N+1 query issues in a Spring Data JPA app when loading a list of Orders with their Items. What is the correct fix?
- Set spring.jpa.open-in-view=true
- Use JOIN FETCH in a JPQL query or a @EntityGraph on the repository method (Correct answer)
- Increase the Hibernate batch size to 1000
- Annotate the Items collection with @Transient
Correct answer: Use JOIN FETCH in a JPQL query or a @EntityGraph on the repository method
JOIN FETCH or @EntityGraph eagerly loads associated entities in a single SQL query, eliminating the extra per-row queries that cause the N+1 problem.
Question 40: How should Spring Framework professionals evaluate new technology tools?
- Assess functionality, reliability, security, cost-effectiveness, and alignment with professional needs (Correct answer)
- Adopt all new technology immediately
- Avoid all new technology
- Wait until competitors adopt first
Correct answer: Assess functionality, reliability, security, cost-effectiveness, and alignment with professional needs
This is fundamental to Spring Framework practice. Assess functionality, reliability, security, cost-effectiveness, and alignment with professional needs represents the professional standard for technology in the Spring Framework certification framework.
Question 41: Which Spring Cloud Contract feature helps ensure API contracts are met between microservices?
- Automatically generates OpenAPI specs from Spring MVC annotations
- Replaces integration tests with static analysis
- Generates producer-side tests from consumer-defined contracts and stubs for consumer tests (Correct answer)
- Monitors API calls in production and alerts on deviations
Correct answer: Generates producer-side tests from consumer-defined contracts and stubs for consumer tests
Spring Cloud Contract generates tests for the producer side and stubs for consumers based on shared contract definitions, preventing breaking API changes.
Question 42: What is the N+1 query problem in JPA?
- A limitation where a session can process at most N+1 concurrent queries
- A performance issue where fetching N entities triggers N additional queries to load each entity's lazy associations (Correct answer)
- A bug where primary key generation fails for every Nth entity
- A deadlock between a parent transaction and N child transactions
Correct answer: A performance issue where fetching N entities triggers N additional queries to load each entity's lazy associations
The N+1 problem occurs when JPA executes 1 query to load N entities and then N additional queries to lazily load each entity's associations, causing excessive database round trips.
Question 43: A development team wants feature flags to toggle new Spring bean implementations without redeploying. Which approach is most idiomatic in Spring?
- Store the flag in a database and poll it every 60 seconds inside the bean
- Use @ConditionalOnProperty so beans activate based on application properties refreshed via Spring Cloud Config (Correct answer)
- Restart the application with a different JAR for each feature combination
- Use @Primary and manually swap beans at runtime via reflection
Correct answer: Use @ConditionalOnProperty so beans activate based on application properties refreshed via Spring Cloud Config
@ConditionalOnProperty combined with Spring Cloud Config's /actuator/refresh allows toggling bean implementations by updating a config property without redeployment.
Question 44: What does the @EnableWebSecurity annotation do in a Spring Security application?
- Generates an auto-configured login form at /login
- Activates Spring Security's web security support and the Spring Security filter chain (Correct answer)
- Enables HTTPS enforcement across all endpoints
- Configures CORS policies for all REST controllers
Correct answer: Activates Spring Security's web security support and the Spring Security filter chain
@EnableWebSecurity imports Spring Security's WebSecurityConfiguration and enables the default filter chain for securing HTTP requests.
Question 45: Spring has been created by
- Daniel Fernandez
- Red Hat Software
- Pivotal Software (Correct answer)
- Apache
Correct answer: Pivotal Software
The Spring Framework was initially created by Rod Johnson. Over time, its development and stewardship evolved, and it was primarily maintained and supported by Pivotal Software. Pivotal Software was later acquired by Broadcom's VMware Tanzu division, but Pivotal Software is recognized as the key entity responsible for its development and advancement among the given choices.
Question 46: Which scope creates a new bean instance for every HTTP request?
- singleton
- session
- request (Correct answer)
- prototype
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 47: What is the ApplicationContext in Spring Framework?
- A web request handler
- An advanced IoC container that adds enterprise features on top of BeanFactory (Correct answer)
- A database connection pool
- A configuration file parser
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 48: A Spring application subject to SOC 2 Type II must demonstrate that configuration secrets are never stored in source control. Which Spring Cloud feature enforces this at runtime?
- Spring Cloud Config Server backed by HashiCorp Vault, with no secrets in git (Correct answer)
- Using @Value annotations with default fallback values
- Spring Boot's application.properties encryption via Jasypt
- Storing secrets in bootstrap.yml committed to the repository
Correct answer: Spring Cloud Config Server backed by HashiCorp Vault, with no secrets in git
Spring Cloud Config Server can use Vault as a backend, fetching secrets at startup from Vault's encrypted store so no secret ever appears in the git repository.
Question 49: What is the primary risk of using @Transactional(propagation=REQUIRES_NEW) carelessly in Spring?
- It increases memory usage by caching transaction data
- It can cause deadlocks by creating nested independent transactions that lock shared resources (Correct answer)
- It disables the Spring transaction manager for the annotated method
- It prevents the method from being called within an existing transaction
Correct answer: It can cause deadlocks by creating nested independent transactions that lock shared resources
REQUIRES_NEW suspends the outer transaction and starts a new one, which can deadlock if both transactions need the same database row.
Question 50: What does the @Configuration annotation indicate in Spring?
- The class should be proxied
- The class is a source of bean definitions (Correct answer)
- The class contains request mappings
- The class handles exceptions
Correct answer: The class is a source of bean definitions
@Configuration marks a class as a source of bean definitions, allowing @Bean methods to be declared inside it for the Spring IoC container.
Question 51: A professional is designing a Spring application that must publish and consume domain events within the same application. What is the recommended approach?
- Use a third-party message broker only
- Use ApplicationEventPublisher with @EventListener (Correct answer)
- Use direct method calls on all listeners
- Poll a shared database table for events
Correct answer: Use ApplicationEventPublisher with @EventListener
ApplicationEventPublisher and @EventListener provide Spring's built-in in-process event mechanism for decoupled component communication.
Question 52: In Spring Boot, what is an @EventListener?
- A JMX management interface
- A WebSocket event handler
- A Kafka message listener
- An annotation that marks a method to handle application events published in the Spring context (Correct answer)
Correct answer: An annotation that marks a method to handle application events published in the Spring context
@EventListener marks a method as a handler for application events published via ApplicationEventPublisher, enabling decoupled event-driven communication.
Question 53: When using MockMvc, which method is used to simulate an HTTP GET request to a controller endpoint?
- mockMvc.invoke(get("/path"))
- mockMvc.simulate(MockMvcRequestBuilders.get("/path"))
- mockMvc.perform(get("/path")) (Correct answer)
- mockMvc.request(HttpMethod.GET, "/path")
Correct answer: mockMvc.perform(get("/path"))
MockMvc.perform() accepts a RequestBuilder such as MockMvcRequestBuilders.get() to simulate HTTP requests in tests.
Question 54: What annotation limits the @Autowired candidate beans to a specific name?
- @Primary
- @Qualifier (Correct answer)
- @Named
- @Specific
Correct answer: @Qualifier
@Qualifier is used alongside @Autowired to narrow down the injection candidate when multiple beans of the same type exist.
Question 55: A product owner wants weekly status emails on a Spring project. The team finds this disruptive to workflow. What is the best resolution?
- Ignore the request
- Negotiate an automated weekly summary from the project board that requires no manual effort from developers (Correct answer)
- Have developers write manual emails every Friday
- Refuse to provide any status updates
Correct answer: Negotiate an automated weekly summary from the project board that requires no manual effort from developers
Automating the status report satisfies the PO's visibility need without burdening developers with manual reporting overhead.
Question 56: What happens when you use @Transactional on a method called from within the same class in Spring?
- Spring uses AspectJ weaving to enforce the transaction
- The transaction annotation is ignored because Spring AOP uses proxies (Correct answer)
- An exception is thrown at application startup
- A new transaction is always started regardless
Correct answer: The transaction annotation is ignored because Spring AOP uses proxies
Spring's default proxy-based AOP intercepts calls from outside the bean; internal self-invocation bypasses the proxy and thus the @Transactional behavior.
Question 57: A junior developer on a Spring team submits a PR with a significant design flaw. How should the reviewer communicate this?
- Provide specific, constructive feedback with an explanation of the design concern and a suggested alternative (Correct answer)
- Reject the PR with no explanation
- Approve it to avoid conflict and fix it later
- Rewrite the PR themselves without commenting
Correct answer: Provide specific, constructive feedback with an explanation of the design concern and a suggested alternative
Specific, constructive feedback with alternatives helps the developer learn while keeping the codebase healthy.
Question 58: Which Spring annotation should a professional use to define a configuration class that replaces XML-based bean definitions?
- @Component
- @Configuration (Correct answer)
- @Service
- @Bean
Correct answer: @Configuration
@Configuration marks a class as a source of bean definitions and is processed by Spring's container at startup.
Question 59: Which interface is passed as a method parameter to a Spring Data repository method to support pagination?
- PageSlice
- PageInfo
- Pageable (Correct answer)
- Pagination
Correct answer: Pageable
Pageable is the Spring Data interface that encapsulates page number, page size, and sorting information to enable paginated repository queries.
Question 60: How does Spring Vault integrate with compliance requirements for secret rotation without application restart?
- It caches secrets permanently in the application context
- It stores secrets in application.properties at startup
- It requires manual redeployment for every secret change
- It uses @RefreshScope beans so secrets can be reloaded via /actuator/refresh (Correct answer)
Correct answer: It uses @RefreshScope beans so secrets can be reloaded via /actuator/refresh
@RefreshScope combined with Spring Cloud Config and Vault allows secrets to be rotated in Vault and pulled into the running application without a restart.
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