Use javax.validation.constraints

MSAL

Use javax.validation.constraints instead of the deprecated org.hibernate.validator.constraints in Spring Boot 2.0 or higher.

org.openrewrite.java.spring.boot2.MigrateHibernateConstraintsToJavax
mod run . --recipe=org.openrewrite.java.spring.boot2.MigrateHibernateConstraintsToJavax

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Change type org.hibernate.validator.constraints.NotBlank to javax.validation.constraints.NotBlank
  2. Change type org.hibernate.validator.constraints.NotEmpty to javax.validation.constraints.NotEmpty
  3. Change type org.hibernate.validator.constraints.Email to javax.validation.constraints.Email
  4. Add javax.validation-api dependency