在 Spring Boot 2.3 中找不到 javax.validation [英] javax.validation not found in Spring boot 2.3

查看:68
本文介绍了在 Spring Boot 2.3 中找不到 javax.validation的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

升级到 Spring Boot 2.3.1 后 javax.validation 包未找到.

After upgrade to Spring Boot 2.3.1 javax.validation package not found.

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.3.1.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

在它工作正常之前.现在 imprort javax.validation.Valid; 这个导入没有解决.在这里

Before it's working fine. Now imprort javax.validation.Valid; this import not resolved. Didn't found anything their release also here

我现在需要外部添加这个包吗?

Should I need to externally add this package now?

推荐答案

Spring-Boot-2.3 发行说明上的内容

It is the on the release notes of Spring-Boot-2.3

https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.3-Release-Notes#validation-starter-no-longer-included-in-web-初学者

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

这篇关于在 Spring Boot 2.3 中找不到 javax.validation的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆