问题描述:
在写项目时,springboot启动的时候出现error,但是却可以正常运行。
具体报错:
2022-05-13 17:42:01 [ERROR] Root bean: class [null]; scope=; abstract=false; lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null can't be resolved bean type!
后来发现原因:
在Application中写了@EnableNacosDiscovery注解,@EnableNacosDiscovery注解会自动创建一些bean实例,配置文件如果没有完全配好,会导致这些bean实例没有创建完全,就会出现上述报错。


![Springboot启动时报错:Root bean: class [null] Springboot启动时报错:Root bean: class [null]](http://www.mshxw.com/aiimages/31/885615.png)
