<ref local="testDAO">是在本XML配置文件中寻找一个id为testDAO的bean你必须要配置
解决方案 »
- Hibernate的clear方法
- 在线求助js级联
- Linux 系统下 tomcat 静态页乱码 在线等 急
- [200分]"select A.deptname,A.deptdesc from Dept A where A.deptdesc like ?"该hql如何用list来取,代码如下:
- 求各位大神帮助,JAVA新手
- Lucene高亮显示没有作用求救~~
- 请问如何实现动态表单+validate框架的验证?
- ██急██Struts超怪问题████同一jsp页面,我在Struts中Forward跳转的和直接打开的不一致是为什么呢?
- weblogic和tomcat运行结果不同,怎回事?
- 求助404页面点击重新加载怎么跳到之前的页面
- 在Jboss中能否修改文件上传的默认路径?
- jdbc:oracle:thin:@localhost thin是什么含义,还有其他的方式吗?
<bean id="testService" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionManager"><ref local="myTransactionManager"/></property>
<property name="target"><ref local="testTarget"/></property>
<property name="transactionAttributes">
<props>
<prop key="create*">PROPAGATION_REQUIRED,-TestException</prop>
</props>
</property>
</bean> <!-- OrderTarget primary business object implementation -->
<bean id="testTarget" class="demo.service.dao.TestServiceSpring">
<property name="testDAO"><ref local="testDAO"/></property>
</bean> <!-- DAO object: Hibernate implementation -->
<bean id="testDAO" class="demo.dao.hibernate.TestDao">
<property name="sessionFactory"><ref local="mySessionFactory"/></property>
</bean>
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testService' defined in resource [/WEB-INF/spring.bean.xml] of ServletContext: Can't resolve reference to bean 'testTarget' while setting property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testTarget' defined in resource [/WEB-INF/spring.bean.xml] of ServletContext: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'testDAO' of bean class [demo.service.dao.TestServiceSpring]: Property 'testDAO' is not writableorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testTarget' defined in resource [/WEB-INF/spring.bean.xml] of ServletContext: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'testDAO' of bean class [demo.service.dao.TestServiceSpring]: Property 'testDAO' is not writableorg.springframework.beans.NotWritablePropertyException: Invalid property 'testDAO' of bean class [demo.service.dao.TestServiceSpring]: Property 'testDAO' is not writable