OpenAPI3&Spring Boot 自定义配置
DocProperties
@Data
@ConfigurationProperties("doc.info")
public class DocProperties {
private String group = "default";
private String title = "API";
private String description = "RESTFUL API";
private String version = "v2.0.0";
private String serverUrl;
private String license = "Apache 2.0";
private String licenseUrl = "https://www.apache.org/licenses/LICENSE-2.0.html";
private List<SecurityScheme> securitySchemes = Lists.newArrayList();}
DocConfiguration
@Slf4j
@AllArgsConstructor
@EnableConfigurationProperties(DocProperties.class)
public class DocConfiguration {
private final DocProperties docProperties;
@Bean
public GroupedOpenApi api()