code-examples
code-examples copied to clipboard
Bean validation with Spring Boot: validation starter is not included in the web starter
The issue refers to the Validation with Spring Boot - the Complete Guide post, section Using the Spring Boot Validation Starter.
I was following the post to implement validation in my Spring Boot v.2.5.4 project that uses solely spring-boot-starter-web. It turned out that the validation starter does not come for free with the web starter. In fact, I had to manually add the spring-boot-starter-validation dependency to my pom.xml file.
I checked the build.gradle file for this project and the validation starter is also explicitly added.
Could you verify this and amend the post?
I found a related StackOverflow answer. It seems that the validation starter is no longer included in web starters since v2.3.