Tagged articles
Bean Validation
29 articles · Page 1 of 1
This article dissects Spring Boot's three validation paths — request body, controller parameters, and service methods — revealing why @Validated on service methods silently fails without a proxy, and details proxy creation conditions, self-invocation traps, collection validation syntax, exception mapping, and debugging steps.
@Valid Cascading@ValidatedAOP Proxy
0 likes · 19 min read

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 article walks through why manual if‑else checks are cumbersome for API input validation, introduces Java Bean Validation (JSR‑303/349/380) and its implementations, shows how to use @Validated and @Valid annotations in Spring Boot, and demonstrates unified exception handling for clean error responses.
Bean ValidationHibernate ValidatorJava
0 likes · 21 min read

This guide covers Spring Boot parameter validation using Bean Validation annotations, demonstrating basic setup with @Valid/@Validated, custom validator creation for phone numbers, group validation for create/update scenarios, global exception handling for MethodArgumentNotValidException and ConstraintViolationException, and best practices like DTO separation and nested object validation.
Bean ValidationException HandlingHibernate Validator
0 likes · 12 min read

This tutorial shows how to replace Spring Boot's default Hibernate Validator with Apache BVal, covering Maven dependencies, basic bean validation, property‑level checks, value validation, custom constraints, and seamless Spring Boot integration with full code examples.
Apache BValBean ValidationJava
0 likes · 9 min read

The article explains how @NotNull, @NotBlank, and @NotEmpty annotations from javax.validation differ in their constraints on primitive types, strings, collections, and maps, and shows why adding @Validated to method parameters is required for the validations to take effect.
AnnotationsBean ValidationJava
0 likes · 3 min read

This article walks through Spring Bean Validation fundamentals, demonstrating how to apply built‑in constraints, create custom validators, use group validation, perform cascading request validation, and enable method‑level checks, all with clear code examples and best‑practice recommendations.
BackendBean ValidationJSR-380
0 likes · 9 min read

This article explains why both front‑end and back‑end data validation are essential for secure and user‑friendly web applications, introduces Java Bean Validation annotations, shows how to integrate them with Spring MVC, and compares common Java permission‑control frameworks such as Spring Security, Shiro and Sa‑Token.
Bean ValidationJavaSpring Security
0 likes · 16 min read

This tutorial walks through the need for robust API parameter validation in Spring Boot, introduces the Bean Validation specification and its implementations, explains key constraint annotations, demonstrates a quick start with Maven dependencies, shows how to build DTOs and controllers, and details a unified global exception handling strategy for clean error responses.
API validationBean ValidationException Handling
0 likes · 22 min read

This tutorial shows how to use Javax Validator annotations to simplify backend service interfaces, covering basic, collection, date, enum, conditional, group, and custom validations with complete Maven dependencies and example code, plus handling of validation exceptions.
AnnotationsBackendBean Validation
0 likes · 16 min read

This article presents a curated collection of 110 Spring Boot 3 practical examples, covering @Profile usage, PropertySource configuration, resource loading, bean validation, and automatic proxy creation, providing developers with hands‑on code snippets and clear explanations to enhance backend development skills.
AnnotationsBackendBean Validation
0 likes · 8 min read

This article provides a comprehensive guide to data validation in Spring Boot 3, covering Bean Validation annotations, controller and service‑layer checks, JPA entity validation, custom constraints, validation groups, programmatic validation, and internationalized error messages with practical code examples and tests.
Bean ValidationJPAJava
0 likes · 16 min read

This article explains how to replace repetitive manual if‑else checks with Spring Boot’s built‑in Bean Validation, demonstrating the use of @Valid, @Validated, custom constraint annotations, group validation, and global exception handling to achieve clean, reusable, and maintainable parameter validation across controllers and services.
Bean ValidationSpring Bootparameter-validation
0 likes · 20 min read


政采云技术Nov 22, 2023 · Backend Development
This article provides an in‑depth overview of Spring Validation, covering standard Bean Validation 2.0 annotations, Hibernate extensions, the differences between @Valid and @Validated, practical usage in controllers, programmatic validation, Dubbo integration, group validation, and how to create custom validation annotations with full code examples.
Bean ValidationDubboannotation
0 likes · 16 min read

Learn how to implement comprehensive parameter validation in Spring Boot 2.6.12 using JSR‑303 Bean Validation, covering simple checks, validation groups, single‑parameter validation, nested objects, custom utilities, internationalization, and unified AOP‑based handling with practical code examples and configuration steps.
AOPBean ValidationJSR-303
0 likes · 12 min read

This guide explains Spring Validation in Spring Boot 2.6, covering its lightweight features, configuration of Bean Validation providers, injection of validators, practical examples, custom annotation creation, method‑level validation, and additional configuration options with clear code samples.
Bean ValidationCustom AnnotationsJava
0 likes · 8 min read

Learn how to implement both simple parameter checks and complex business rule validations in SpringBoot by leveraging Bean Validation, creating custom annotations like @UniqueUser and @NotConflictUser, and integrating them seamlessly into controllers to ensure data integrity and reduce boilerplate logic.
Bean ValidationBusiness Rule ValidationCustom Annotations
0 likes · 9 min read

Bean Validation (JSR‑303/380) offers a standard, annotation‑driven API—implemented by Hibernate Validator—for declaring constraints such as @NotNull or @Email, while Spring integrates it via @Valid and @Validated (with group support and AOP‑based method validation), enabling automatic request‑body checks, custom constraints, and service‑layer validation, provided the proper annotations are applied.
Bean ValidationJSR-303Spring
0 likes · 15 min read

Learn how to integrate Bean Validation with Spring 5.2.23, configure the validator, inject it, create custom constraints, and enable method‑level validation using MethodValidationPostProcessor, with complete code examples and execution results, including handling of constraint violations and bean registration steps.
BackendBean ValidationCustom Constraints
0 likes · 7 min read

This article explains the Jakarta Bean Validation standard, its applicable scenarios, annotation basics, integration with Hibernate Validator, configuration options, simple and advanced usage examples—including group sequencing and multi‑field validation—along with practical code snippets and deployment considerations for backend Java development.
AnnotationsBackendBean Validation
0 likes · 15 min read

This article explains how to seamlessly integrate JSR‑303 Bean Validation with Spring Boot, covering the underlying concepts, required dependencies, built‑in and Hibernate‑specific constraints, simple, group and nested validation techniques, result handling, the role of spring‑boot‑starter‑validation, and how to create custom validation annotations and validators.
BackendBean ValidationJSR-303
0 likes · 17 min read

This guide explains how to configure and use Spring Bean Validation, demonstrates simple and method‑level validation, and shows how to create custom constraint annotations with full code examples for a Spring Boot 2.4.11 application.
BackendBean ValidationCustom Annotation
0 likes · 7 min read

This comprehensive guide explores Spring Validation in depth, covering basic usage, dependency setup, requestBody and requestParam validation, unified exception handling, group validation, nested and collection validation, custom constraints, programmatic checks, fail‑fast mode, and the differences between @Valid and @Validated, while revealing the underlying implementation in Spring MVC.
Bean ValidationCustom ConstraintHibernate Validator
0 likes · 18 min read

This article explains how to use JSR‑380 Bean Validation 2.0 and Hibernate Validator in Spring Boot applications, covering built‑in constraints, custom annotations, group validation, method and container element validation, fast‑fail mode, and integration with @Valid and @Validated for clean, reusable data checks.
AnnotationsBean ValidationHibernate Validator
0 likes · 19 min read

This article walks through the fundamentals of JSR‑303 Bean Validation in Spring Boot, explains how to add the starter dependency, lists built‑in constraint annotations, demonstrates simple, group and nested validation, shows how to capture validation errors, and guides you through creating custom constraint annotations and validators with full code examples.
Bean ValidationCustom ConstraintJSR-303
0 likes · 18 min read

This article explains how to use Bean Validation in Spring Boot to replace repetitive IF‑ELSE checks with annotation‑driven parameter checks, covers built‑in and Hibernate‑specific constraints, demonstrates custom validators, group validation, and shows how to centralize error responses with a global exception handler.
Bean ValidationException HandlingJava
0 likes · 11 min read

This tutorial explains why server‑side request parameter validation is essential, introduces the JSR‑303 Bean Validation standard and its Hibernate Validator implementation, and provides step‑by‑step code examples, Swagger integration tips, and dependency guidance for building robust Spring Boot REST APIs.
Bean ValidationHibernate ValidatorJSR-303
0 likes · 11 min read

This article explains how to simplify Spring service method parameter checks by encapsulating inputs in POJOs, applying bean‑validation annotations, and using a custom AOP aspect or standard @AssertTrue to automatically enforce validation logic.
AOPBean ValidationSpring
0 likes · 6 min read

This article introduces JSR‑303 Bean Validation, lists required JARs, explains core constraint annotations for null, boolean, size, date, and numeric checks, and provides complete Java code examples demonstrating how to apply and test these validations in a Spring MVC environment.
Bean ValidationHibernate ValidatorJSR-303
0 likes · 8 min read
