【swagger问题】不带/doc.html访问后台项目swaager,接口测试实际请求后台接口地址少了项目前缀

pull/8387/merge
JEECG 2025-07-25 13:14:11 +08:00
parent 7b80ae3e68
commit 118775cf79
2 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ public class WebMvcConfiguration implements WebMvcConfigurer {
*/
@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("/").setViewName("doc.html");
registry.addViewController("/").setViewName("redirect:/doc.html");
}
@Bean

View File

@ -40,7 +40,7 @@ public class JeecgSystemApplication extends SpringBootServletInitializer {
String path = oConvertUtils.getString(env.getProperty("server.servlet.context-path"));
log.info("\n----------------------------------------------------------\n\t" +
"Application Jeecg-Boot is running! Access URLs:\n\t" +
"Local: \t\thttp://localhost:" + port + path + "/doc.html\n\t" +
"Local: \t\thttp://localhost:" + port + path + "\n\t" +
"External: \thttp://" + ip + ":" + port + path + "/doc.html\n\t" +
"Swagger文档: \thttp://" + ip + ":" + port + path + "/doc.html\n" +
"----------------------------------------------------------");