After migrating Spring Boot from 2.2.7. to 2.3.0, I get package javax.validation.constraints does not exist when using @NotNull annotation. When switching back to 2.2.7 it works again.

I could add

<dependency>
    <groupId>javax.validation</groupId>
    <artifactId>validation-api</artifactId>
    <version>2.0.1.Final</version>
</dependency>

myself, however this does not seem to be documented?

Comment From: snicoll

This actually is, isn’t it?

https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.3-Release-Notes#validation-starter-no-longer-included-in-web-starters

Comment From: YNedderhoff

I am clearly blind, thank you. Adding the dependency fixed it.

Comment From: neverkah

use "mvn clean package -x" The POM for org.hibernate.validator:hibernate-validator:jar:6.2.3. Final is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details found org\jboss\shrinkwrap\descriptors\shrinkwrap-descriptors-bom\2.0.0 has errors

then i delete folders org\jboss\shrinkwrap\descriptors\shrinkwrap-descriptors-bom\2.0.0 problem solved