前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >【Bug】SpringCloudAlibaba整合Swagger时 启动报错

【Bug】SpringCloudAlibaba整合Swagger时 启动报错

作者头像
陶然同学
发布2023-02-27 10:57:59
6620
发布2023-02-27 10:57:59
举报
文章被收录于专栏:陶然同学博客

报错

Description:

Parameter 2 of constructor in springfox.documentation.spring.web.readers.parameter.ModelAttributeParameterExpander required a bean of type 'springfox.documentation.spi.schema.EnumTypeDeterminer' that could not be found.

Action:

Consider defining a bean of type 'springfox.documentation.spi.schema.EnumTypeDeterminer' in your configuration.

问题背景

在SpringCloud Alibaba整合swagger2时,启动时报以上错误。

代码语言:javascript
复制
            <!--swagger2-->
            <dependency>
                <groupId>io.springfox</groupId>
                <artifactId>springfox-swagger2</artifactId>
                <version>${swagger.version}</version>
            </dependency>
            <dependency>
                <groupId>io.springfox</groupId>
                <artifactId>springfox-swagger-ui</artifactId>
                <version>${swagger.version}</version>
            </dependency>

版本是2.7.0 

问题原因

是因为swagger2版本太低导致的问题

解决方案

版本改为:<version>2.9.2</version>

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2022-06-20,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 报错
  • 问题背景
  • 问题原因
  • 解决方案
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档