日期:2014-05-17  浏览次数:20780 次

关于ssh框架文件映射的问题
文件applicationContext.xml中部分设置
<value>
  com/xjgl/hibernate/beans/Cx.hbm.xml
</value>
.................................
<bean id="CxDAO" class="com.xjgl.hibernate.beans.CxDAO">
  <property name="sessionFactory">
  <ref local="sessionFactory" />
  </property>
</bean>
....................................
<bean id="CxDAOProxy"
  class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
  <property name="transactionManager">
  <ref bean="transactionManager" />
  </property>
  <property name="target">
  <ref local="CxDAO" />
  </property>
  <property name="transactionAttributes">
  <props>
  <prop key="insert*">PROPAGATION_REQUIRED</prop>
  <prop key="*">PROPAGATION_REQUIRED,readOnly</prop>
  </props>
  </property>
</bean>
.............................
<bean name="/cx" class="com.xjgl.struts.actions.CxAction">
  <property name="CxDAO">
  <ref local="CxDAO"/>
  </property>
</bean>
.............................
文件struts-config.xml部分配置
<form-bean name="cxForm" type="com.xjgl.struts.forms.CxForm" />
..............................
<action input="/cxgl/cx.jsp" name="cxForm" path="/cx" scope="request"
  parameter="method" type="org.springframework.web.struts.DelegatingActionProxy">
</action>
...............................
tomcat启动时部分出错提示
ERROR - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '/cx' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.InvalidPropertyException: Invalid property 'CxDAO' of bean class [com.xjgl.struts.actions.CxAction]: No property 'CxDAO' found
...................................................................
Caused by: org.springframework.beans.InvalidPropertyException: Invalid property 'CxDAO' of bean class [com.xjgl.struts.actions.CxAction]: No property 'CxDAO' found
...................................................................
ERROR - Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '/cx' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.InvalidPropertyException: Invalid property 'CxDAO' of bean class [com.xjgl.struts.actions.CxAction]: No property 'CxDAO' found
....................................................................................................
Caused by: org.springframework.beans.InvalidPropertyException