springboot2.3之後hibernate-validator依賴缺失【踩坑】
阿新 • • 發佈:2020-11-27
springboot2.3之後,hibernate-validator依賴缺失
今天在寫專案的時候,發現@Blank註解沒有了,檢查了一下,發現老版本springboot內整合的hibernate-validator依賴已經去掉了
如圖,當前版本2.4.0的spring-boot-starter-web包
版本2.1.3
在網上查閱了一下:
官方解釋
解決方法:
在pom檔案裡手動加入依賴
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-validation --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-validation</artifactId> <version>2.3.5.RELEASE</version> </dependency>
到此這篇關於springboot2.3之後hibernate-validator依賴缺失【踩坑】的文章就介紹到這了,更多相關springboot hibernate-validator依賴缺失內容請搜尋我們以前的文章或繼續瀏覽下面的相關文章希望大家以後多多支援我們!