请问 thymeleaf 和 openapi 冲突吗
调用 http://localhost:8081/swagger-ui.html 的时候404了
配了WebMvcConfigurer 但是没有用
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {
@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("/").setViewName("login");
registry.addViewController("/login.html").setViewName("login");
registry.addViewController("/websocket.html").setViewName("websocket");
registry.addViewController("/error.html").setViewName("error");
registry.addViewController("/file.html").setViewName("file");
}
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("swagger-ui.html")
.addResourceLocations("classpath:/META-INF/resources/");
registry.addResourceHandler("/webjars/**")
.addResourceLocations("classpath:/META-INF/resources/webjars/");
}
}
代码
starplatinum111/JpaStu (gitee.com)
图片