Skip to content

Stay curious. Build better.

Appearance

Choose how BestHub looks on this device.

Changes apply immediately.

Search articles

Open Discover with these filters

Suggested searches

Explore BestHub

#Controller Design

RSS feed
Follow or choose interest 7-day signal and related keywords

Latest articles

4 articles in the current browsing window, ordered by publication date.

RuoYi BaseController: Template Method Pattern for Unified Controller Logic

This article analyzes RuoYi 3.9.2's BaseController class, which encapsulates common controller operations like date binding, pagination, response handling, and user context retrieval using the template method pattern, enabling consistent CRUD controller implementations across the framework.

5 Common Spring Boot Anti‑Patterns You Must Avoid

The article examines five high‑frequency Spring Boot anti‑patterns—field injection, returning entities from controllers, overusing @Transactional, generic exception handling, and embedding business logic in controllers—showing problematic code snippets, real‑world consequences, and concise refactored examples to improve testability, performance, and maintainability.

Improving Spring Boot Controllers: From Bad Practices to Clean Design with @Valid and Global Exception Handling

This article examines common pitfalls in Spring Boot controller implementations, demonstrates how to refactor messy controllers into clean, maintainable code using @Valid for input validation and a centralized exception handler, and highlights best‑practice guidelines for backend development.

Improving Spring Boot Controllers: From Unclean to Elegant with Validation and Global Exception Handling

This article examines common pitfalls in Spring Boot controller implementations, demonstrates how excessive if‑else checks and business logic in controllers degrade code quality, and provides clean, refactored examples using @Valid validation, concise error handling, and a global exception handler to achieve more maintainable backend services.

Up to 500 articles, 100 per page. The archive offers another way to explore older articles.