kai*_*ido 4 java import spring gradle spring-boot
我目前有一个 java/spring-boot 应用程序,我将版本(在代码中)从 2.1.4 更改为 2.3.0,但结果我error: package javax.validation.constraints does not exist在尝试运行干净的构建时遇到了错误- 这来自import javax.validation.constraints.NotEmpty;我的代码中有一行 - 有谁知道如何解决这个问题以成功编译/构建代码?
Validation Starter 依赖项不再包含在 web starter 依赖项中。因此,您需要手动将其添加到您的 gradle 文件中:
implementation 'org.springframework.boot:spring-boot-starter-validation'
Run Code Online (Sandbox Code Playgroud)
这在发行说明中提到:
| 归档时间: |
|
| 查看次数: |
4013 次 |
| 最近记录: |