黑马头条Day1第15集访问Swagger显示:
Unable to infer base url. This is common when using dynamic servlet registration or when the API is …。
解决方法:
1.检查你的spring.factories中复制的地址com.heima.common.exception.ExceptionCatch与com.heima.common.swagger.SwaggerConfiguration之间是否有,\如果没有请加上。
2.在UserApplication类下添加如下注解
@ComponentScan(basePackages = "com.heima")