← All Spring Framework Flashcard Decks

Mixed Deck — All Spring Framework Topics Flashcards

100 cards from real Spring Framework practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 20 Mixed Deck — All Spring Framework Topics flashcards as text
  1. In Spring, what is meant by 'circular dependency'?

    Answer: Two or more beans that depend on each other either directly or indirectly

    A circular dependency occurs when Bean A depends on Bean B and Bean B depends on Bean A, which can cause Spring to throw a BeanCurrentlyInCreationException with constructor injection.

  2. What role does peer review play in Spring Framework practice?

    Answer: It provides quality assurance and professional development through collegial evaluation

    This is fundamental to Spring Framework practice. It provides quality assurance and professional development through collegial evaluation represents the professional standard for professional standards in the Spring Framework certification framework.

  3. How do you override a specific auto-configuration class in Spring Boot?

    Answer: Use @SpringBootApplication(exclude = {ClassName.class})

    The exclude attribute of @SpringBootApplication (or @EnableAutoConfiguration) accepts an array of auto-configuration classes to disable.

  4. Which annotation in Spring Boot Test is used to auto-configure a TestRestTemplate for full integration tests?

    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.

  5. In Spring Boot, what is the purpose of application profiles?

    Answer: To load different configurations based on the active environment (dev, test, prod)

    Spring profiles allow you to define environment-specific beans and configuration properties, activated via spring.profiles.active.

  6. Which Spring Boot feature allows you to override specific properties only during tests without modifying application.properties?

    Answer: @TestPropertySource or properties attribute in @SpringBootTest

    @TestPropertySource or the properties/args attribute on @SpringBootTest injects test-specific property values that override the main configuration.

  7. What Spring feature enables component scanning to detect annotated classes automatically?

    Answer: @ComponentScan

    @ComponentScan tells Spring to scan specified packages for classes annotated with @Component, @Service, @Repository, and @Controller.

  8. What is the Spring Boot DevTools feature 'LiveReload'?

    Answer: Automatically refreshes the browser when classpath resources change

    LiveReload is a DevTools feature that triggers a browser refresh when static resources or templates change, improving the development feedback loop.

  9. When evaluating Spring Data query performance, which approach provides concrete evidence of the SQL generated by a derived query method?

    Answer: Setting spring.jpa.show-sql=true and logging the output

    Setting spring.jpa.show-sql=true (or enabling Hibernate SQL logging) logs the actual SQL statements, giving direct evidence of what queries Spring Data generates.

  10. In a Spring Boot test, what is the recommended way to test exception handling in a REST controller using MockMvc?

    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.

  11. What is a risk mitigation strategy in Spring Framework practice?

    Answer: Implementing controls that reduce the likelihood or impact of identified risks

    This is fundamental to Spring Framework practice. Implementing controls that reduce the likelihood or impact of identified risks represents the professional standard for risk management in the Spring Framework certification framework.

  12. How does Spring Vault integrate with compliance requirements for secret rotation without application restart?

    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.

  13. What is the return type of the findById() method defined in Spring Data's CrudRepository?

    Answer: Optional

    findById() returns Optional to safely handle the case where no entity with the given ID exists, avoiding NullPointerExceptions.

  14. A Spring researcher wants to prove that BeanPostProcessors execute before @PostConstruct. Which approach provides direct experimental evidence?

    Answer: Add logging in a custom BeanPostProcessor and in a @PostConstruct method; observe log order at startup

    Instrumenting both a BeanPostProcessor.postProcessBeforeInitialization() and a @PostConstruct method with distinct log statements and observing startup log order is direct empirical evidence of the initialization sequence.

  15. When researching Spring bean initialization order issues, which tool provided by Spring Framework helps visualize the dependency graph?

    Answer: ApplicationContext.getBeanDefinitionNames() combined with dependency introspection

    Programmatic inspection via getBeanDefinitionNames() and BeanFactory dependency APIs, or IDE plugins, are the evidence-based approaches for diagnosing Spring bean dependency ordering issues.

  16. Which Spring annotation can be applied to a test class to replace beans with Spy objects that wrap real implementations?

    Answer: @SpyBean

    @SpyBean wraps an existing Spring bean with a Mockito spy, allowing partial mocking while retaining real method behavior.

  17. How should Spring Framework professionals stay current with regulatory changes?

    Answer: Monitor regulatory updates, participate in professional associations, and attend continuing education

    This is fundamental to Spring Framework practice. Monitor regulatory updates, participate in professional associations, and attend continuing education represents the professional standard for regulatory in the Spring Framework certification framework.

  18. A healthcare application built with Spring Boot must comply with HITECH Act breach notification requirements, necessitating detection of unauthorized PHI access. Which pattern best achieves this?

    Answer: Implementing @PostAuthorize with a custom expression that logs and alerts when returned data contains PHI attributes accessed by unauthorized roles

    @PostAuthorize evaluates after the method executes and can inspect the return value; a custom security expression can check whether PHI was returned to a caller without the appropriate role and trigger an alert.

  19. What is the purpose of the spring.test.mockmvc.print property or .andDo(print()) in MockMvc tests?

    Answer: Prints the full HTTP request and response details to the console for debugging

    .andDo(print()) outputs the complete request/response details including headers, body, and status to the console during test execution.

  20. How should an Spring Framework professional approach a novel situation not covered by standard procedures?

    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.

How this page was made: written with AI tools and published by Nathan Beja, founder of Practice Test Geeks, who is responsible for its content. 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

  1. docs.broadcom.com — Test delivery, retake policy, exam information · verified Oct 2026
  2. spring-academy.broadcom.com — Eligibility · verified Oct 2026
  3. broadcom.com — Fees, exam format, passing score, time limit · verified Oct 2026
Mixed Deck — All Spring Framework Topics Flashcards — Spring Framework Study Cards with Answers