spring事务配置问题请教!
以下配置会出现找不到servlet错误,在log4j中有以下信息:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'autoProxy' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Error converting typed String value for bean property 'beanNames' with key [0]; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert value of type [java.lang.String] to required type [com.auth.dao.ClerkDAO]; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [java.lang.String] to required type [com.auth.dao.ClerkDAO] for property 'null': no matching editors or conversion strategy found
Caused by:
org.springframework.beans.TypeMismatchException: Failed to convert value of type [java.lang.String] to required type [com.auth.dao.ClerkDAO]; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [java.lang.String] to required type [com.auth.dao.ClerkDAO] for property 'null': no matching editors or conversion strategy found
Caused by:
java.lang.IllegalArgumentException: Cannot convert value of type [java.lang.String] to required type [com.auth.dao.ClerkDAO] for property 'null': no matching editors or conversion strategy found
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory"> <ref local="sessionFactory" /> </property> </bean><bean id="ClerkDAO" class="com.auth.dao.ClerkDAO"> <property name="sessionFactory"> <ref bean="sessionFactory" /> </property> </bean> <bean id="transactionInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor"> <property name="transactionManager"> <ref local="transactionManager" /> </property> <property name="transactionAttributes"> <props> <prop key="save*">PROPAGATION_REQUIRED</prop> <prop key="find*">PROPAGATION_REQUIRED,readOnly</prop> <prop key="*">PROPAGATION_REQUIRED</prop> </props> </property> </bean> <bean id="autoProxy" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator"> <property name="beanNames"> <ref local="ClerkDAO" /> </property> <property name="interceptorNames"> <list> <value>transactionInterceptor</value> </list> </property> </bean>