mirror of
https://gitee.com/ssssssss-team/magic-api.git
synced 2026-05-13 09:17:21 +08:00
fix:修复springboot项目配置server.servlet.context-path 时,swagger访问资源404问题
This commit is contained in:
@@ -87,7 +87,7 @@ public class MagicSpringDocConfiguration implements MagicPluginConfiguration {
|
||||
} else {
|
||||
urls = new HashSet<>(urls);
|
||||
}
|
||||
urls.add(new SwaggerUrl(springDocConfig.getGroupName(), springDocConfig.getLocation(), null));
|
||||
urls.add(new SwaggerUrl(springDocConfig.getGroupName(), servletContext.getContextPath() + springDocConfig.getLocation(), null));
|
||||
params.put("urls", urls);
|
||||
return params;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user