@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(""))); }
标签:SecurityScheme,description,配置,API,OpenApi3.0,new,Open,Authorization From: https://www.cnblogs.com/w2011/p/17056066.html