From 3c5309ba716e94ca1a396c079acb4fc8d4c29245 Mon Sep 17 00:00:00 2001 From: Kapil-chn7 Date: Tue, 5 May 2026 02:23:59 +0530 Subject: [PATCH 1/2] Clarify dependency requirement for Bean Validation support See gh-50290 Signed-off-by: Kapil-chn7 --- .../docs/antora/modules/reference/pages/io/validation.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/io/validation.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/io/validation.adoc index 98c7dbda537..d0a83add5ca 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/io/validation.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/io/validation.adoc @@ -1,7 +1,7 @@ [[io.validation]] = Validation -The method validation feature supported by Bean Validation 1.1 is automatically enabled as long as a JSR-303 implementation (such as Hibernate validator) is on the classpath. +The method validation feature supported by Bean Validation 1.1 is automatically enabled as long as a JSR-303 implementation (such as Hibernate Validator, typically provided by adding `spring-boot-starter-validation`) is on the classpath. This lets bean methods be annotated with `jakarta.validation` constraints on their parameters and/or on their return value. Target classes with such annotated methods need to be annotated with the javadoc:org.springframework.validation.annotation.Validated[format=annotation] annotation at the type level for their methods to be searched for inline constraint annotations. @@ -14,4 +14,4 @@ This allows you to use xref:features/internationalization.adoc[your application' Once the parameters have been resolved, message interpolation is completed using Bean Validation's default interpolator. To customize the javadoc:jakarta.validation.Configuration[] used to build the javadoc:jakarta.validation.ValidatorFactory[], define a javadoc:org.springframework.boot.autoconfigure.validation.ValidationConfigurationCustomizer[] bean. -When multiple customizer beans are defined, they are called in order based on their javadoc:org.springframework.core.annotation.Order[format=annotation] annotation or javadoc:org.springframework.core.Ordered[] implementation. +When multiple customizer beans are defined, they are called in order based on their javadoc:org.springframework.core.annotation.Order[format=annotation] annotation or javadoc:org.springframework.core.Ordered[] implementation. \ No newline at end of file From 091b0f3c4176b0b701d07eb2dfb91c62d08e625b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Nicoll?= Date: Fri, 29 May 2026 11:40:33 +0200 Subject: [PATCH 2/2] Polish "Clarify dependency requirement for Bean Validation support" See gh-50290 --- .../docs/antora/modules/reference/pages/io/validation.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/io/validation.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/io/validation.adoc index d0a83add5ca..8982860bfa1 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/io/validation.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/io/validation.adoc @@ -1,7 +1,7 @@ [[io.validation]] = Validation -The method validation feature supported by Bean Validation 1.1 is automatically enabled as long as a JSR-303 implementation (such as Hibernate Validator, typically provided by adding `spring-boot-starter-validation`) is on the classpath. +The method validation feature supported by Bean Validation 1.1 is automatically enabled as long as a JSR-303 implementation (such as Hibernate Validator, typically provided by `spring-boot-starter-validation`) is on the classpath. This lets bean methods be annotated with `jakarta.validation` constraints on their parameters and/or on their return value. Target classes with such annotated methods need to be annotated with the javadoc:org.springframework.validation.annotation.Validated[format=annotation] annotation at the type level for their methods to be searched for inline constraint annotations. @@ -14,4 +14,4 @@ This allows you to use xref:features/internationalization.adoc[your application' Once the parameters have been resolved, message interpolation is completed using Bean Validation's default interpolator. To customize the javadoc:jakarta.validation.Configuration[] used to build the javadoc:jakarta.validation.ValidatorFactory[], define a javadoc:org.springframework.boot.autoconfigure.validation.ValidationConfigurationCustomizer[] bean. -When multiple customizer beans are defined, they are called in order based on their javadoc:org.springframework.core.annotation.Order[format=annotation] annotation or javadoc:org.springframework.core.Ordered[] implementation. \ No newline at end of file +When multiple customizer beans are defined, they are called in order based on their javadoc:org.springframework.core.annotation.Order[format=annotation] annotation or javadoc:org.springframework.core.Ordered[] implementation.