引入swagger
出现
Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException
经过排查错误,检查依赖版本是否兼容、排除冲突的依赖、检查Swagger配置、清理缓存、检查文档注释等等。最后在启动类上添加注解@EnableCustomSwagger2
,成功解决出现的问题。
@EnableCustomSwagger2 //添加这一行
@SpringBootApplication
public class RuoYiApplication
{
public static void main(String[] args)
{
// System.setProperty("spring.devtools.restart.enabled", "false");
SpringApplication.run(RuoYiApplication.class, args);
System.out.println("(♥◠‿◠)ノ゙ 若依启动成功 ლ(´ڡ`ლ)゙ \n" +
" .-------. ____ __ \n" +
" | _ _ \\ \\ \\ / / \n" +
" | ( ' ) | \\ _. / ' \n" +
" |(_ o _) / _( )_ .' \n" +
" | (_,_).' __ ___(_ o _)' \n" +
" | |\\ \\ | || |(_,_)' \n" +
" | | \\ `' /| `-' / \n" +
" | | \\ / \\ / \n" +
" ''-' `'-' `-..-' ");
}
}
这个注解在ruoyi-common-swagger
模块的com.ruoyi.common.swagger.annotation
中。
powered by kaifamiao