错误展示
2.7.3版本的SpringBoot整合Swagger时,报如下错误
org.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException: Cannot invoke "org.springframework.web.servlet.mvc.condition.PatternsRequestCondition.getPatterns()" because "this.condition" is null
配置了静态资源映射也没有用
解决方法
在`application.yml`配置文件中添加:
spring:
mvc:
pathmatch:
matching-strategy: ant_path_matcher
项目启动成功!