在之前的版本已经整合了Dao,代码如下:
<bean id="dao" class="org.nutz.dao.impl.NutDao">
<property name="dataSource" ref="dataSource"/>
<property name="runner" ref="daoRunner"/>
<property name="sqlManager" ref="sqlManager"/>
</bean>
现在使用1.r.58,想试试Dao拦截器,于是参照文档声明了类TestDaoInterceptor,将上面的配置改为:
<bean id="testInterceptor" class="com.sysbase.dao.interceptor.TestDaoInterceptor" />
<bean id="dao" class="org.nutz.dao.impl.NutDao">
<property name="dataSource" ref="dataSource"/>
<property name="runner" ref="daoRunner"/>
<property name="sqlManager" ref="sqlManager"/>
<property name="interceptors">
<list>
<ref local="testInterceptor"></ref>
</list>
</property>
</bean>
启动Tomcat后报错:
Invalid property 'interceptors' of bean class [org.nutz.dao.impl.NutDao]: Bean property 'interceptors' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
我看了看DaoSupport,是有setInterceptors,是我配置的有问题吗?求指点,谢谢。