配置swagger时出现

Failed to start bean ‘documentationPluginsBootstrapper‘; nested exception is java.lang.NullPointerException
解决方法:
- 1:需要在启动类上添加@EnableWebMvc,但会导致swagger页面访问不了
- 2:似乎spring boot2.6版本使用任何swagger都会报错降低spring boot版本到2.5.
- 3:添加spring.mvc.pathmatch.matching-strategy=ant_path_matcher在配置文件中,解决问题
浙公网安备 33010602011771号