今天整合SSH,出现了这个问题Context initialization failed,很是郁闷。

ERROR [org.springframework.web.struts.ContextLoaderPlugIn] - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 
'headsService' defined in ServletContext resource [/WEB-INF/classes/applicationContext-heads.xml]: Initialization of bean failed; nested exception is org.springframework.beans.InvalidPropertyException: Invalid property 'hDao' of bean class [com.forestryInfo.biz.impl.HeadsBizImpl]: No property 'hDao' found
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:
478)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$
1.run(AbstractAutowireCapableBeanFactory.java:409)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:
380)
 at org.springframework.beans.factory.support.AbstractBeanFactory$
1.getObject(AbstractBeanFactory.java:264)
 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:
220)
 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:
261)
 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:
185)
 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:
164)
 at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:
429)
 at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:
729)
 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:
381)
 at org.springframework.web.struts.ContextLoaderPlugIn.createWebApplicationContext(ContextLoaderPlugIn.java:
354)
 at org.springframework.web.struts.ContextLoaderPlugIn.initWebApplicationContext(ContextLoaderPlugIn.java:
295)
 at org.springframework.web.struts.ContextLoaderPlugIn.init(ContextLoaderPlugIn.java:
225)
 at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:
869)
 at org.apache.struts.action.ActionServlet.init(ActionServlet.java:
336)
 at javax.servlet.GenericServlet.init(GenericServlet.java:
212)
 at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:
1139)
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:
966)
 at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3956)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:
4230)
 at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:
1116)
 at org.apache.catalina.startup.HostConfig.check(HostConfig.java:
1214)
 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:
293)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:
120)
 at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:
1306)
 at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:
1570)
 at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:
1579)
 at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:
1559)
 at java.lang.Thread.run(Thread.java:
619)
Caused by: org.springframework.beans.InvalidPropertyException: Invalid property 
'hDao' of bean class [com.forestryInfo.biz.impl.HeadsBizImpl]: No property 'hDao' found
 at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:
382)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:
1287)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:
1248)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:
1008)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:
470


这里主要提示:
Error creating bean with name 'headsService' defined in ServletContext resource [/WEB-INF/classes/applicationContext-heads.xml]: Initialization of bean failed; nested exception is org.springframework.beans.InvalidPropertyException: Invalid property 'hDao' of bean class 



我找了好久错误的原因,但都没有找到。
后面,我干脆讲“hDao”改为“dao”,整个程序就能运行起来了。
很是无奈,想了好久还是想不明白。