整合Spring Boot 2.3.x 與Spring Cloud Hoxton SR5以上版本報錯。Failed to start bean 'documentationPluginsBootstrapper';


在整合Spring Boot 2.3.x 與Spring Cloud Hoxton SR5以上版本時,運行微服務啟動類會報Failed to start bean 'documentationPluginsBootstrapper'; nested exception is com.google.common.util.concurrent.ExecutionError: com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: javax/validation/constraints/Min。

原因是在Spring Boot 2.3版本后,將validation包單獨提取出來,需要單獨引入該依賴。

在被引用的pom文件中加入該依賴

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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM