← 返回 walmartlabs 的题目列表Spring Boot Verbal Quiz
类型:qbank
An open-format verbal block appended to the coding round, drilling Spring Boot fundamentals, web-app design hygiene, environment management, accessibility, and request-lifecycle hooks.
Requirements
No coding — the interviewer asks a sequence of short verbal questions and grades on accuracy, vocabulary, and the ability to motivate trade-offs. Representative questions reported:
If many beans are application-scoped and memory keeps growing, what could be wrong?
How would you design a clean and maintainable dependency structure in a Spring Boot + Thymeleaf app?
If teams log in different ways and logs are hard to search, how would you fix it?
How do you safely manage different environments (dev / QA / prod) in Spring Boot?
For an elderly-friendly Spring Boot + Thymeleaf app, what UX or accessibility improvements would you use?
If users lose sessions or get logged out when switching secure pages, how would you debug and fix it?
If you need to run logic after request handling but before rendering the response, what Spring mechanism would you use?
How would you build a product list page with pagination and sorting in Spring Boot?
How would you handle long-running tasks in Spring Boot to avoid performance issues?
How do you design a Spring Boot app for high availability and load balancing?
A form has complex validation rules. What steps would you take to ensure maintainability and a good user experience?
How does implicit navigation work in Spring Boot, and what considerations would you keep in mind?
Notes
Memory growth with application-scoped beans is almost always the bean holding references to per-request state — collections that grow unbounded, listener registrations that never unsubscribe, caches without eviction. The clean fix is to scope the offending bean correctly (@RequestScope or @SessionScope) or to add explicit eviction.
Dependency hygiene in Spring is constructor injection, package-by-feature, and an explicit module boundary for cross-cutting concerns (security, persistence). Field injection is the standard anti-pattern to call out.
Log unification: structured logging (JSON), shared log format, correlation ID propagated via MDC, central aggregation (ELK / Loki). The follow-up usually pushes on correlation ID across thread boundaries (MDC.put lost in async — propagate manually or use a context-aware executor).
Environment management: Spring Profiles + externalized config (application-{profile}.yml) + secret management outside the JAR (Vault / SSM / k8s secrets). Avoid if (env == 'prod') branches in code.
Accessibility for elderly users: larger touch targets, high-contrast themes, simplified flows, screen-reader-friendly markup (ARIA), font scaling, no time-bounded session expiry without warning.
Session loss across secure pages is usually a cookie-domain or secure / sameSite misconfiguration, or a session-affinity gap behind a load balancer. The diagnostic steps are: check cookies in the browser, check session replication / sticky sessions on the LB, check Spring Session backing store.
"Run logic after handling, before rendering" is HandlerInterceptor.postHandle for MVC or a ResponseBodyAdvice for REST. Avoid @AfterReturning aspects for view concerns.
Long-running tasks: do not block the request thread. Use @Async with a bounded executor for fire-and-forget; use a job queue (RabbitMQ, Kafka) for durable work; for in-flight progress, expose a polling endpoint or SSE.
High availability: stateless services + multiple replicas + LB + health checks + circuit breakers (Resilience4j); externalize state to a managed store; distribute by region with a global LB if latency demands it.
Complex validation: split annotations (jakarta.validation) from imperative Validator beans; group constraints with @Validated groups; surface errors as a structured response with field-level codes the frontend can localize.
Preparation
Make a one-page Spring Boot cheat sheet covering scopes, profiles, validation, interceptors / advice, async, sessions, security, and observability. Practice answering each topic in under 60 seconds.
Read your most-used application.yml end-to-end before the loop; the round often anchors on "how would you set this in a real project," not on theory.
Prepare two real-world stories: a production issue you debugged that traced back to a bean scope / lifecycle bug, and a logging or observability rollout you led. The verbal questions are easier to answer with concrete anchors.