问题

@Tag和@Operation标签失效

但是@Schema标签有效

pom依赖

org.springdocspringdoc-openapi-starter-webmvc-ui2.2.0

debug排查,发现时国际化问题

解决方法:application.yml配置禁用i18n翻译

springdoc:# 若开启,不使用国际化,可能会导致无法获得@tag和@operation标签的内容disable-i18n: trueapi-docs:# 是否开启接口文档enabled: trueswagger-ui:# 持久化认证数据,如果设置为 true,它会保留授权数据并且不会在浏览器关闭/刷新时丢失persistAuthorization: true#remove-broken-reference-definitions: false#默认地址是,可导入apifox http://localhost:8080/v3/api-docs#默认ui地址是 http://localhost:8080/swagger-ui/index.html