Add this dependency below to theyour pom.xml file and @NotBlank, @NotNull, @Valid, etc. should work fine.
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<version>2.0.2</version>
</dependency>