spring的配置文件换成了用拦截器来代理事务,Tomcat启动报如题所示的错误,找到的原因如下:
解决办法是:
在事务中加上下面语句
<property name="proxyTargetClass" >
<value>true</value>
</property>
表示proxy代理的是类而不是接口。
<!-- 拦截器 -->
<bean id="transactionInterceptor"
class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager" ref="transactionManager" />
<!-- 配置事务属性 -->
<property name="transactionAttributes">
<props>
<prop key="update*">PROPAGATION_REQUIRED</prop>
<prop key="query*">PROPAGATION_REQUIRED,readOnly</prop>
</props>
</property>
</bean>
<bean
class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
<property name="proxyTargetClass">
<value>true</value>
</property> <property name="beanNames">
<list>
<value>*DAO</value>
</list>
</property>
<property name="interceptorNames">
<list>
<value>transactionInterceptor</value>
</list>
</property>
</bean>
分享到:
相关推荐
Caused by: java.lang.IllegalArgumentException: Cannot convert value of type [java.lang.String] to required type [java.util.Date] for property 'dateValue': no matching editors or conversion strategy ...
当用户遇到"Cannot serve directory No matching DirectoryIndex (index.html) found"的错误时,这意味着Apache无法找到默认的索引文件来显示目录内容。这个问题通常发生在尝试访问一个没有指定默认首页文件(如`...
no matching function call(解决方案).md
在本例中,我们关注的错误是“fatal error: boostdesc_bgm.i: No such file or directory”,这通常意味着在尝试编译代码时,编译器无法找到名为“boostdesc_bgm.i”的特定头文件。 `boostdesc_bgm.i` 文件是Boost...
no matching function for call to function (解决方案).md
Android模拟器安装APP出现INSTALL_FAILED_NO_MATCHING_ABIS错误解决方案 当我们想在电脑的Android模拟器中安装APP的时候,会报INSTALL_FAILED_NO_MATCHING_ABIS错误【如图1】,导致APP无法在模拟器中运行。下面给出...
Type 异常报告 消息 Failed to convert ... nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'java.util.Date': no matching editors or co
ORA-28040: No matching authentication protocol问题需要oracle12匹配的驱动,目前使用的ojdbc6会出现此问题。用ojdbc8.jar即可解决此问题。官网下载的原版。
Oracle 登录 报错No matching authentication protocol 文档
原文链接https://www.codeproject.com/Articles/99457/Edge-Based-Template-Matching; 其中vs2015+opencv3.3版code:https://download.csdn.net/download/zfjbit/10732568
动态元素匹配(Dynamic Element Matching, DEM)技术是提高数据转换器性能的一种重要手段,尤其在高速、高精度的数据转换中具有显著作用。这篇由Jerry Wayne Bruce撰写的论文深入探讨了动态元素匹配技术在数据转换器...
invalid conversion from `void*' to `SeqList*' 是怎么回事 void *是特殊的指针 所有类型指针都可以付给void *;但是void *类型指针付给其他指针类型需要强制类型转换。 invalid conversion from `void*' to `...
ST-Matching算法 java实现
figure matching figure matching figure matching figure matching figure matching figure matching figure matching figure matching
基于形状的模板匹配,Edge Based Template Matching Implementing an edge based template matching or pattern matching algorithm.
image matching AD algorithm matlab
此资源仅供学习使用,请...Motion Matching for Unity (MxM) is an advanced alternative animation system to mecanim which enables fluid and responsive character animation without the need for state machines.
In the LSB matching, the choice of whether to add or subtract one from the cover image pixel is random. The new method uses the choice to set a binary function of two cover pixels to the desired ...