当前位置: 代码迷 >> 综合 >> springcloud Feign 与 Swagger2 自动注入失败()
  详细解决方案

springcloud Feign 与 Swagger2 自动注入失败()

热度:61   发布时间:2023-10-17 06:43:04.0

ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name  


这个 错误是 ,你引入的 Swagger2 的版本问题,将 


<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.5.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.5.0</version>
</dependency> 


swagger 架包 弄到 2.5.0 版本以上,问题就 解决了

  相关解决方案