整合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>

 

posted @ 2021-05-04 19:46  Carln  阅读(3919)  评论(0)    收藏  举报