中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

項目升級到springboot2.3之后hibernate-validator消失了如何解決

發布時間:2020-08-13 11:34:29 來源:億速云 閱讀:431 作者:小新 欄目:開發技術

小編給大家分享一下項目升級到springboot2.3之后hibernate-validator消失了如何解決,希望大家閱讀完這篇文章后大所收獲,下面讓我們一起去探討吧!

項目升級到springboot2.3之后,參數校驗的注解報錯,發現spring-boot-starter-web的依賴項已經去除了依賴

點開spring-boot-starter-web源碼看了下。

<&#63;xml version="1.0" encoding="UTF-8"&#63;>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <!-- This module was also published with a richer model, Gradle metadata, -->
 <!-- which should be used instead. Do not delete the following line which -->
 <!-- is to indicate to Gradle or any Gradle module metadata file consumer -->
 <!-- that they should prefer consuming it instead. -->
 <!-- do_not_remove: published-with-gradle-metadata -->
 <modelVersion>4.0.0</modelVersion>
 <groupId>org.springframework.boot</groupId>
 <artifactId>spring-boot-starter-web</artifactId>
 <version>2.3.1.RELEASE</version>
 <name>spring-boot-starter-web</name>
 <description>Starter for building web, including RESTful, applications using Spring MVC. Uses Tomcat as the default embedded container</description>
 <url>https://spring.io/projects/spring-boot</url>
 <organization>
  <name>Pivotal Software, Inc.</name>
  <url>https://spring.io</url>
 </organization>
 <licenses>
  <license>
   <name>Apache License, Version 2.0</name>
   <url>https://www.apache.org/licenses/LICENSE-2.0</url>
  </license>
 </licenses>
 <developers>
  <developer>
   <name>Pivotal</name>
   <email>info@pivotal.io</email>
   <organization>Pivotal Software, Inc.</organization>
   <organizationUrl>https://www.spring.io</organizationUrl>
  </developer>
 </developers>
 <scm>
  <connection>scm:git:git://github.com/spring-projects/spring-boot.git</connection>
  <developerConnection>scm:git:ssh://git@github.com/spring-projects/spring-boot.git</developerConnection>
  <url>https://github.com/spring-projects/spring-boot</url>
 </scm>
 <issueManagement>
  <system>GitHub</system>
  <url>https://github.com/spring-projects/spring-boot/issues</url>
 </issueManagement>
 <dependencyManagement>
  <dependencies>
   <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-dependencies</artifactId>
    <version>2.3.1.RELEASE</version>
    <type>pom</type>
    <scope>import</scope>
   </dependency>
  </dependencies>
 </dependencyManagement>
 <dependencies>
  <dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter</artifactId>
   <version>2.3.1.RELEASE</version>
   <scope>compile</scope>
  </dependency>
  <dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-json</artifactId>
   <version>2.3.1.RELEASE</version>
   <scope>compile</scope>
  </dependency>
  <dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-tomcat</artifactId>
   <version>2.3.1.RELEASE</version>
   <scope>compile</scope>
  </dependency>
  <dependency>
   <groupId>org.springframework</groupId>
   <artifactId>spring-web</artifactId>
   <scope>compile</scope>
  </dependency>
  <dependency>
   <groupId>org.springframework</groupId>
   <artifactId>spring-webmvc</artifactId>
   <scope>compile</scope>
  </dependency>
 </dependencies>
</project>

沒有發現 hibernate-validator

原版本如下:

<dependency>
   <groupId>org.hibernate.validator</groupId>
   <artifactId>hibernate-validator</artifactId>
   <version>6.0.17.Final</version>
   <scope>compile</scope>
 </dependency>

剛看了一下官方文檔。需要手動引入

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

看完了這篇文章,相信你對項目升級到springboot2.3之后hibernate-validator消失了如何解決有了一定的了解,想了解更多相關知識,歡迎關注億速云行業資訊頻道,感謝各位的閱讀!

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

南川市| 普洱| 延边| 正安县| 定结县| 徐闻县| 唐河县| 百色市| 滨海县| 环江| 沭阳县| 侯马市| 瑞丽市| 抚松县| 水富县| 巴楚县| 林甸县| 谷城县| 灵台县| 高雄市| 迁西县| 视频| 房产| 册亨县| 安岳县| 宜春市| 闸北区| 新源县| 安乡县| 普兰店市| 平安县| 昌都县| 黎川县| 鄂温| 利津县| 长春市| 安顺市| 屏东市| 徐闻县| 吴堡县| 巴林右旗|