Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot resolve symbol 'NotBlank'?

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.

like image 422
沈晨凯 Avatar asked Jun 08 '20 03:06

沈晨凯


Video Answer


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'
}
like image 139
Scott Frederick Avatar answered Oct 25 '22 16:10

Scott Frederick