Record error: when using JSR verification, @Email will become popular solution

Question: When JSR303 in springBoot checks the data, @Email bursts red

Solution: Add the 'spring-boot-starter-validation' dependency in the pom.xml file

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

Then you need to refresh Maven to see that dependencies have been injected

 At this time, the @Email annotation will not become popular

 

Guess you like

Origin blog.csdn.net/m0_62780474/article/details/127891819