SpringBoot @Vaild注解拦截不生效

不要单独引入包,可能引入的包不全导致不生效!

直接引入SpringBoot 的starter

 <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-validation</artifactId>
      <version>RELEASE</version>
      <scope>compile</scope>
    </dependency>

告诫自己以后关于注解不生效的问题,优先考虑导入的包有没有问题

猜你喜欢

转载自blog.csdn.net/qq_39046786/article/details/107976468
今日推荐