今日debug

多模块项目打包时碰到Unable to find main class

根据https://my.oschina.net/tridays/blog/825245大佬方法解决

因为在parent里使用了spring-boot-maven-plugin插件从而导致repackage,注释掉后install又碰到there are test failures

在maven中将(跳过测试)勾上即可

 

启动后无法访问swagger-ui.html

原因是静态资源路径映射导致

构建一个Config类继承WebMvcConfigurationSupport重写addResourceHandlers

registry.addResourceHandler("swagger-ui.html")
.addResourceLocations("classpath:/META-INF/resources/");

registry.addResourceHandler("/webjars/**")
.addResourceLocations("classpath:/META-INF/resources/webjars/");

posted on 2020-02-22 18:03  MasterTumbler  阅读(100)  评论(0编辑  收藏  举报

导航