My Spring Boot application embeds Swagger UI. I would like to get a "Dark display" but I do not succeed
I tried to do it via the following class:
@Configuration
public class SwaggerConfig {
private final SwaggerUiConfigProperties swaggerUiConfig;
@Autowired
public SwaggerConfig(SwaggerUiConfigProperties swaggerUiConfig) {
this.swaggerUiConfig = swaggerUiConfig;
}
@Bean
public SwaggerUiConfigParameters swaggerUiConfigParameters() {
SwaggerUiConfigParameters configParameters = new SwaggerUiConfigParameters(swaggerUiConfig);
configParameters.setConfigUrl("/my-swagger-dark.css");
return configParameters;
}
}
I Placed my custom CSS in the resource directory src/main/resources/static/my-swagger-dark.css
but when I try to connect to Swagger UI I get a strange page referencing a URL that is not handled by my software: .json
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744292885a4567117.html
评论列表(0条)