Tag

Validation

1 views collected around this technical thread.

Java Captain
Java Captain
Jun 8, 2025 · Backend Development

How to Refactor Bloated Spring Controllers into Clean, Maintainable Code

The article critiques overly large and tangled Spring MVC controllers, demonstrates ugly examples filled with try‑catch blocks, field validations, and business logic, then presents streamlined, elegant alternatives using @Valid, @Autowired, proper exception handling, and best‑practice guidelines to dramatically reduce code size and improve readability.

Best PracticesController RefactoringException Handling
0 likes · 10 min read
How to Refactor Bloated Spring Controllers into Clean, Maintainable Code
macrozheng
macrozheng
Jun 5, 2025 · Backend Development

How to Refactor Spring Boot Controllers for Cleaner, More Maintainable Code

This article compares messy and elegant Spring Boot controller implementations, demonstrates how to use @Valid for input validation, introduces a concise global exception handler, and provides practical refactoring steps and open‑source resources to dramatically reduce controller code size and improve maintainability.

@ValidBackend DevelopmentController
0 likes · 10 min read
How to Refactor Spring Boot Controllers for Cleaner, More Maintainable Code
Top Architect
Top Architect
Jun 3, 2025 · Backend Development

Best Practices for Spring MVC Controller Design: Unified Response, Validation, and Exception Handling

This article explains how to design Spring MVC controllers with a unified response structure, implement request validation using JSR‑303 and custom annotations, handle exceptions uniformly, and resolve issues with ResponseBodyAdvice and HttpMessageConverters to improve code clarity and maintainability.

ControllerException HandlingJava
0 likes · 18 min read
Best Practices for Spring MVC Controller Design: Unified Response, Validation, and Exception Handling
Architect
Architect
May 27, 2025 · Backend Development

Improving Spring MVC Controller Layer: Unified Response, Validation, and Exception Handling

This article explains how to refactor a Spring MVC Controller layer by separating responsibilities, implementing a unified response structure, handling String response conversion, customizing validation with JSR‑303, and creating centralized exception handling to produce consistent API results.

ControllerException HandlingJava
0 likes · 20 min read
Improving Spring MVC Controller Layer: Unified Response, Validation, and Exception Handling
Top Architecture Tech Stack
Top Architecture Tech Stack
May 23, 2025 · Backend Development

Best Practices for Designing a Robust Spring MVC Controller Layer

This article explains the essential responsibilities of a Spring MVC controller, identifies common pitfalls such as duplicated validation and inconsistent responses, and demonstrates how to unify response structures, handle String conversion issues, apply JSR‑303 validation, create custom validators, and implement centralized exception handling using ResponseBodyAdvice and @RestControllerAdvice.

ControllerExceptionHandlingResponseBodyAdvice
0 likes · 17 min read
Best Practices for Designing a Robust Spring MVC Controller Layer
Java Architect Essentials
Java Architect Essentials
Apr 29, 2025 · Backend Development

Using @Validated in Spring Boot to Eliminate Repetitive Validation Code

This article explains how the @Validated annotation in Spring Boot can replace repetitive validation logic by supporting group validation, providing cleaner code, better maintainability, and higher development efficiency for Java backend developers.

@ValidatedAnnotationBackend
0 likes · 9 min read
Using @Validated in Spring Boot to Eliminate Repetitive Validation Code
Top Architecture Tech Stack
Top Architecture Tech Stack
Apr 16, 2025 · Backend Development

Improving Spring Controller Design: Unified Response Structure, Validation, and Exception Handling

This article explains how to refactor Spring MVC controllers by introducing a unified response wrapper, using ResponseBodyAdvice for automatic packaging, handling String conversion issues, applying JSR‑303 validation for request parameters, creating custom validators, and defining centralized exception handling to keep controller code clean and maintainable.

ControllerExceptionHandlingJava
0 likes · 17 min read
Improving Spring Controller Design: Unified Response Structure, Validation, and Exception Handling
Code Mala Tang
Code Mala Tang
Apr 12, 2025 · Fundamentals

Master the Luhn Algorithm: Definition, Examples, and TypeScript Implementation

Learn what the Luhn (mod‑10) algorithm is, its real‑world applications such as credit‑card and IMEI validation, step‑by‑step calculation examples, and see practical TypeScript and JavaScript implementations that you can integrate into your web projects.

JavaScriptLuhnValidation
0 likes · 6 min read
Master the Luhn Algorithm: Definition, Examples, and TypeScript Implementation
php中文网 Courses
php中文网 Courses
Apr 7, 2025 · Backend Development

Using PHP is_numeric() to Determine If a Variable Is Numeric

This article explains PHP's is_numeric() function, detailing how it determines whether a variable is numeric, provides multiple code examples—including basic checks, form input validation, and edge cases—while highlighting special considerations such as handling of decimal points and signs.

BackendValidationis_numeric
0 likes · 4 min read
Using PHP is_numeric() to Determine If a Variable Is Numeric
Top Architecture Tech Stack
Top Architecture Tech Stack
Mar 20, 2025 · Backend Development

Refactoring Spring MVC Controller Layer: Unified Response Structure, Validation, and Exception Handling

This article explains how to refactor the Spring MVC Controller layer by unifying response structures, using ResponseBodyAdvice for automatic wrapping, handling parameter validation with JSR‑303, and implementing custom exceptions with centralized exception handling to simplify and standardize API responses.

BackendException HandlingJava
0 likes · 17 min read
Refactoring Spring MVC Controller Layer: Unified Response Structure, Validation, and Exception Handling
Code Ape Tech Column
Code Ape Tech Column
Mar 12, 2025 · Backend Development

AviatorScript: Features, Usage, and Spring Boot Integration for Expression Evaluation and Validation

This article introduces AviatorScript, a lightweight high‑performance JVM‑based scripting language, outlines its core features and limitations, demonstrates how to add it to a Maven project, shows expression evaluation, variable handling, custom functions, script files, and provides a practical Spring Boot AOP validation example with full code snippets.

AOPJavaSpring Boot
0 likes · 18 min read
AviatorScript: Features, Usage, and Spring Boot Integration for Expression Evaluation and Validation
Architect's Tech Stack
Architect's Tech Stack
Mar 10, 2025 · Backend Development

Improving Spring Boot Controllers: From Messy to Elegant with @Valid and Global Exception Handling

This article examines common pitfalls in Spring Boot controller implementations—such as excessive try‑catch blocks, inline validation, and business logic—then demonstrates cleaner alternatives using @Valid, validation annotations, and global exception handling to produce concise, maintainable controllers.

ControllerException HandlingJava
0 likes · 8 min read
Improving Spring Boot Controllers: From Messy to Elegant with @Valid and Global Exception Handling
Selected Java Interview Questions
Selected Java Interview Questions
Mar 3, 2025 · Backend Development

Improving Spring MVC Controllers: Unified Response Structure, Validation, and Exception Handling

This article explains how to refactor Spring MVC controller layers by defining a unified response format, using ResponseBodyAdvice for automatic wrapping, handling String conversion issues, applying parameter validation with JSR‑303, creating custom validators, and implementing centralized exception handling to produce consistent API responses.

ControllerException HandlingJava
0 likes · 17 min read
Improving Spring MVC Controllers: Unified Response Structure, Validation, and Exception Handling
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Feb 1, 2025 · Backend Development

Master Object-Based Messaging in Spring Boot 3 with RabbitMQ – Code Samples & Tips

This article demonstrates how to send and receive messages as objects in Spring Boot 3 using RabbitMQ, covering custom message converters, object validation, idle‑event handling, and custom listener containers with complete code examples.

JavaMessage ConverterRabbitMQ
0 likes · 6 min read
Master Object-Based Messaging in Spring Boot 3 with RabbitMQ – Code Samples & Tips
Model Perspective
Model Perspective
Jan 18, 2025 · Fundamentals

What Aristotle’s Flawed Physics Reveals About Validating Mathematical Models

The article uses Aristotle’s outdated motion theories as a cautionary tale, illustrating how unverified assumptions can derail mathematical models, and outlines three validation steps—theoretical, data, and simulation—to ensure models remain reliable across real‑world complexities.

AristotleValidationmathematical modeling
0 likes · 7 min read
What Aristotle’s Flawed Physics Reveals About Validating Mathematical Models
Architect
Architect
Jan 10, 2025 · Backend Development

Refactoring Spring Controller Layer: Unified Response Structure, Validation, and Exception Handling

The article presents a step‑by‑step guide to refactor Spring MVC controller code by unifying response formats, applying a global response wrapper, enforcing parameter validation with JSR‑303, and handling custom exceptions through a centralized advice, all illustrated with complete Java examples.

ControllerExceptionHandlingJava
0 likes · 18 min read
Refactoring Spring Controller Layer: Unified Response Structure, Validation, and Exception Handling
php中文网 Courses
php中文网 Courses
Jan 8, 2025 · Backend Development

Managing Integer Ranges in PHP: Techniques and Best Practices

This article explains how to manage integer ranges in PHP using loops, conditional checks, and custom functions, highlighting basic techniques, advanced optimizations like bitwise operations, and best‑practice recommendations for efficient, readable code.

Integer RangeLoopPHP
0 likes · 6 min read
Managing Integer Ranges in PHP: Techniques and Best Practices
Architecture Digest
Architecture Digest
Dec 29, 2024 · Backend Development

Refactoring Spring MVC Controllers: Unified Return Structure, Response Advice, Parameter Validation, and Global Exception Handling

This article explains how to refactor the Spring MVC controller layer by introducing a unified response format, using ResponseBodyAdvice for automatic wrapping, fixing String conversion issues, applying JSR‑303 validation, creating custom validators, and handling exceptions globally to keep controller code clean and maintainable.

ControllerExceptionHandlingJava
0 likes · 18 min read
Refactoring Spring MVC Controllers: Unified Return Structure, Response Advice, Parameter Validation, and Global Exception Handling
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Dec 19, 2024 · Backend Development

Mastering Spring DataBinder: Real‑World Binding, Validation & Error Handling

This tutorial explains how Spring's DataBinder binds request parameters to objects, demonstrates practical code examples for successful and erroneous bindings, shows how to add custom validation, set required fields, and customize error codes for clearer user feedback.

Backend DevelopmentBindingResultDataBinder
0 likes · 8 min read
Mastering Spring DataBinder: Real‑World Binding, Validation & Error Handling