xiaoymin / knife4j

Knife4j is a set of Swagger2 and OpenAPI3 All-in-one enhancement solution
https://doc.xiaominfo.com
Apache License 2.0
4.12k stars 619 forks source link

[aggregation cloud模式]500问题 #685

Closed LukLau closed 11 months ago

LukLau commented 11 months ago

Describe the bug 接入knife4j时部署到指定环境,发现404问题

To Reproduce Steps to reproduce the behavior:

  1. springboot version: 2.7.15
  2. See error From Screenshots

Expected behavior 能够正常访问

Screenshots

WechatIMG191

image image

Knife4j Version (please complete the following information):

  1. knife4j-openapi3-spring-boot-starter: 4.3.0
  2. knife4j-aggregation-spring-boot-starter.version: 4.0.0 Additional context Add any other context about the problem here.
LukLau commented 11 months ago
/**
 * knife4j config
 *
 * @author
 */
@Configuration
public class Knife4jConfiguration {

    /**
     * 生成openAPI3 文档配置
     *
     * @return 接口文档定义
     */
    @Bean
    public OpenAPI dressupAvatarApi() {
        return new OpenAPI()
                .info(new Info().title("DressUp RealTimeAvatar")
                        .description("Api Description Document")
                        .version("v0.0.1")

                        .license(new License().name("Apache 2.0").url("http://www.apache.org/licenses/LICENSE-2.0.html")));
    }
}