报错信息 在类上方添加注解@Validated后,添加注解@Email() 爆红 解决方案 在pom.xml文件中添加maven依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> 两个都可以用,二选一