错误:Unnamed bean definition specifies neither 'class' nor 'parent' nor 'factory-bean'
原创
©著作权归作者所有:来自51CTO博客作者qq5e86804b406ce的原创作品,请联系作者获取转载授权,否则将追究法律责任
今天运行spring的代码报错
信息: Loading XML bean definitions from class path resource [applicationContext.xml]
Exception in thread "main" org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unnamed bean definition specifies neither 'class' nor 'parent' nor 'factory-bean' - can't generate bean name
Offending resource: class path resource [applicationContext.xml]
就是因为配置文件里面有一个bean忘记写class属性和id属性了.