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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

找不到在ServletContext中定義的名稱為XXX的bean的類(lèi)XXX

找不到在ServletContext中定義的名稱為XXX的bean的類(lèi)XXX

一只萌萌小番薯 2021-04-29 22:31:35
我正在編寫(xiě)Spring MVC并遇到以下錯(cuò)誤:18:34:44,999警告[org.springframework.web.context.support.XmlWebApplicationContext](MSC服務(wù)線程1-1)上下文初始化期間遇到異常-取消刷新嘗試:org.springframework.beans.factory.BeanCreationException:創(chuàng)建bean時(shí)出錯(cuò)名稱為“ org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0”:Bean初始化失??;嵌套的異常是org.springframework.beans.factory.CannotLoadBeanClassException:找不到在ServletContext資源[/WEB-INF/FetchDevice-servlet.xml]中定義的名稱為'scopedTarget.requestscope'的bean的類(lèi)[com.icumed.beans.RequestInterfaceImpl]。 ; 嵌套的異常是java.lang.ClassNotFoundException:com.icumed.beans.RequestInterfaceImpl,來(lái)自[Module“ deployment.6.BeanScopingRequestSession.war:我的目錄結(jié)構(gòu):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">  <display-name>ICUMED-Req-Session-scope</display-name>  <servlet>    <servlet-name>FetchDevice</servlet-name>    <servlet-class>         org.springframework.web.servlet.DispatcherServlet      </servlet-class>    <load-on-startup>1</load-on-startup>  </servlet>  <servlet-mapping>    <servlet-name>FetchDevice</servlet-name>    <url-pattern>/</url-pattern>  </servlet-mapping>  <listener>    <listener-class>        org.springframework.web.context.request.RequestContextListener    </listener-class>  </listener></web-app>
查看完整描述

1 回答

?
Smart貓小萌

TA貢獻(xiàn)1911條經(jīng)驗(yàn) 獲得超7個(gè)贊

首先:您可以更改過(guò)濾器。有時(shí)它需要那些。


<filter>

<filter-name>requestContextFilter</filter-name>

<filter-class>org.springframework.web.filter.RequestContextFilter</filterclass>

</filter>

<filter-mapping>

<filter-name>requestContextFilter</filter-name>

<url-pattern>/*</url-pattern>      //filter path

</filter-mapping>

第二:你知道的RequestInterfaceImpl是@Autowired。它需要代理;您設(shè)置了proxy-target-class="false",因此它將使用JDK代理而不是CGLib。


您可以執(zhí)行以下操作:


@Autowired(required=true)

private RequestInterface requestInterface;   // use its interface, not impl

或者您可以設(shè)置proxy-target-class="true"。我認(rèn)為這是錯(cuò)誤的,因?yàn)榇恚?/p>


查看完整回答
反對(duì) 回復(fù) 2021-05-19
  • 1 回答
  • 0 關(guān)注
  • 255 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

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