第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

指定事務(wù)管理器 bean 后找不到匹配的編輯器或轉(zhuǎn)換策略

指定事務(wù)管理器 bean 后找不到匹配的編輯器或轉(zhuǎn)換策略

哈士奇WWW 2022-07-14 09:22:49
我是新手,正在嘗試創(chuàng)建一個 Spring5 MVC/Hibernate5 Web 應(yīng)用程序,但是當我啟動 Tomcat 時出現(xiàn)以下錯誤:最初的問題與事務(wù)管理器有關(guān),在添加事務(wù)管理器 bean 定義之前,應(yīng)用程序啟動正常但失敗并顯示錯誤消息,指出它無法創(chuàng)建事務(wù)線程。org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customerController' defined in ServletContext resource [/WEB-INF/spring/store.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'com.sun.proxy.$Proxy210 implementing com.store.service.CustomerService,java.io.Serializable,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised,org.springframework.core.DecoratingProxy' to required type 'com.store.service.CustomerServiceImpl' for property 'customerService'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'com.sun.proxy.$Proxy210 implementing com.store.service.CustomerService,java.io.Serializable,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised,org.springframework.core.DecoratingProxy' to required type 'com.store.service.CustomerServiceImpl' for property 'customerService': no matching editors or conversion strategy found我的 web.xml :<?xml version="1.0" encoding="UTF-8"?><web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"         xmlns="http://java.sun.com/xml/ns/javaee"          xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee                              http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"                             id="WebApp_ID" version="2.5"></web-app>
查看完整描述

1 回答

?
aluckdog

TA貢獻1847條經(jīng)驗 獲得超7個贊

我想在您的CustomerController課程中,您注入的不是接口,而是 的實現(xiàn)CustomerService,如下所示:


public class CustomerController {


    @Autowired

    private CustomerServiceImpl customerService;


}

具體類是代理的,因此您應(yīng)該將注入點指定為接口:


public class CustomerController {


    @Autowired

    private CustomerService customerService;


}


查看完整回答
反對 回復 2022-07-14
  • 1 回答
  • 0 關(guān)注
  • 136 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號