项目场景:
提示:在实现SpringMVC的映射时出现了问题:
例外情况
javax.servlet.ServletException: Servlet[springmvc]的Servlet.init()引发异常
根本原因。
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘xxxController’: Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘xxxService’: Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named ‘xxxDao’ available
问题描述
使用spring4.3,在所有配置按照步骤来的情况下还是出现了bug,是因为没有创建bean->service->controller
原因分析:
找了很久,最后仔细看,发现居然是
大小写
例如:使用
@Resource(name=“AADao”)
public AADao aaDao;可以
@Resource(name=“aaDao”)
public AADao aaDao; 不行