Tagged articles
@Valid
13 articles · Page 1 of 1
This article dissects Spring Boot's validation system, explaining the dual validation paths for @RequestBody and @RequestParam, the critical differences between @Valid and @Validated, core source code mechanisms, group validation, custom constraints, and a complete global exception handling strategy with a unified error response contract.
@Valid@ValidatedBean Validation
0 likes · 22 min read

This guide shows how Spring Boot’s built‑in validation (using @Valid, @Validated and Jakarta Validation annotations) can eliminate repetitive if‑statements, handle nested objects, support group validation, and be extended with custom constraint annotations for clean, maintainable request parameter checks.
@ValidCustom AnnotationHibernate Validator
0 likes · 10 min read

The article analyzes why Spring MVC controllers often become massive with repetitive validation, logging, and business logic, demonstrates an ugly controller example, then shows step‑by‑step refactoring using @Valid, assertion utilities, and a global exception handler to dramatically reduce code size and improve readability.
@ValidClean CodeController Refactoring
0 likes · 8 min read


java1234Jan 13, 2026 · Backend Development
The article shows how cluttered Spring controllers filled with try‑catch blocks, manual field checks, and business logic can be refactored into concise, readable code by using @Valid, assertion utilities, and a global exception handler, cutting the code size roughly in half.
@ValidControllerException Handling
0 likes · 9 min read

This article walks through Spring Boot’s built‑in parameter validation using JSR‑303/JSR‑380, compares @Valid and @Validated, shows how to configure global exception handling, implement group validation, fast‑fail mode, and custom constraints, and demonstrates both controller‑level and service‑level validation with complete code examples.
@Valid@ValidatedHibernate Validator
0 likes · 39 min read

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.
@ValidControllerException Handling
0 likes · 10 min read

This article explains how the @Valid annotation in Spring Boot can automatically enforce bean validation, replace verbose manual checks, support custom validators, and greatly reduce boilerplate code when handling complex form inputs in backend applications.
@ValidForm ValidationJava
0 likes · 8 min read

The article examines common pain points of oversized Spring controllers, contrasts a verbose implementation with a concise version that leverages @Valid and assertion utilities, and provides step‑by‑step guidance on validation annotations, global exception handling, and best‑practice refactoring to improve readability and maintainability.
@ValidBackendController Refactoring
0 likes · 11 min read

The article compares messy Spring MVC controllers packed with try‑catch, field checks, and business logic to concise, well‑structured versions that use @Valid, service delegation, and global exception handling, and provides a step‑by‑step refactoring guide.
@ValidController RefactoringException Handling
0 likes · 9 min read

This article demonstrates how to transform overly complex Spring Boot controllers—filled with repetitive validation, try‑catch blocks, and business logic—into clean, maintainable implementations by applying @Valid annotations, streamlined validation, and a centralized global exception handler.
@ValidBackendController
0 likes · 9 min read

The article critiques overly complex Spring Boot controllers filled with repetitive validation and business logic, demonstrates cleaner implementations using @Valid, Assert, and global exception handling, and provides practical code examples and guidelines for building maintainable backend controllers.
@ValidBackendExceptionHandling
0 likes · 10 min read

Spring Boot offers several ways to validate request parameters—including the @Valid and @Validated annotations and custom validation annotations—each with its own strengths, allowing developers to enforce data integrity, improve code quality, and enhance user experience across different scenarios.
@Valid@ValidatedCustom Annotation
0 likes · 11 min read

This article explains how to import validation dependencies in Spring Boot, compares the semantics of @NotNull, @NotBlank, and @NotEmpty annotations, demonstrates their usage with code examples, and clarifies the behavioral differences between @Valid and @Validated when validating controller inputs.
@Valid@ValidatedNotBlank
0 likes · 7 min read
