【发布时间】:2021-06-16 14:49:26
【问题描述】:
我正在使用 springfox-swagger 3.0.0 记录使用 Spring Boot 2.4.3 创建的 API。所以我现在有以下页面。
我的客户想要将 Swagger UI 徽标更改为他们自己的。我不能这样做。我已经搜索并找到了一些解决方案,但它不起作用。
-
在
/resource/static/swaggercustm.css下添加了以下自定义代码。但没有变化。.swagger-ui img { content: url('/static/css/mylogo.png'); width: 140px; height: 40px; } -
已将
swagger-ui.css导入本地并尝试修改图像路径。但这也无济于事。
有人可以在这里帮我修改徽标吗?如何覆盖标志属性?
【问题讨论】:
-
@omer,谢谢。我以前看到过。现在看来这已经过时了。没有
swagger-ui.html。现在是index.html。另外我是springboot的新手,我正在寻找有关最新版本的详细答案 -
这对我有用
.swagger-ui .topbar .topbar-wrapper img { content:url('mylogo.jpg'); }source
标签: spring-boot swagger-ui springfox