Cannot resolve symbol 'NotBlank'?

Viewed 4257

I just began my spring boot yestoday, but cannot resolve symbol 'NotBlank'. I tried to restart , reimport, can someone tell me how to solve this problem plz.

1 Answers

Adding spring-boot-starter-validation to your project will likely fix this problem.

with Maven:

<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-validation</artifactId>
</dependency>

with Gradle:

dependencies {
  ...
  implementation 'org.springframework.boot:spring-boot-starter-validation'
}
Related