OpenApi3.0 Authorization 配置
@Bean public OpenAPI restfulOpenApis() { return new OpenAPI() .info(new Info().title("Spring Boot 3.0 Restful Open API") .description("The Open API").version("1.0") .license(new License().name("Apache"))) .externalDocs(new ExternalDocumentation() .description("The Open API")) .addSecurityItem(new SecurityRequirement().addList("Authorization")) .components(new Components().addSecuritySchemes("Authorization", new SecurityScheme().name("Authorization").type(SecurityScheme.Type.HTTP).scheme("bearer").bearerFormat(""))); }