春季升级交易问题

时间:2018-11-01 11:04:00

标签: java spring

我将Spring 3升级到Spring 4,并且遇到了报告中的问题 OpenEntityManagerInViewInterceptor- No EntityManager with actual transaction available for current thread - cannot reliably process 'persist' call

现在要解决此问题,我将@Transactional放入我的控制器输入方法中,当这样做时,我在部署时遇到以下异常:

Caused by: java.lang.IllegalStateException: Cannot convert value of type 'com.sun.proxy.$Proxy47 implementing com.krawler.spring.accounting.payment.accPaymentDAO,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised,org.springframework.core.DecoratingProxy' to required type 'com.krawler.spring.accounting.payment.accPaymentImpl' for property 'accPaymentDAOobj': no matching editors or conversion strategy found

此类仅具有用于bean注入的messageSource条目。它是与控制器分离的类。 当我从Controller方法中删除@Transactional时,没有看到此错误。 请让我知道可以做什么。

0 个答案:

没有答案