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

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

我在 Eclipse 中制作了一個(gè)簡單的 Spring MVC 應(yīng)用程序。

我在 Eclipse 中制作了一個(gè)簡單的 Spring MVC 應(yīng)用程序。

qq_笑_17 2022-06-04 10:55:32
當(dāng)我訪問 First_Spring_MVC/welcome 時(shí),出現(xiàn)以下錯(cuò)誤:org.springframework.web.servlet.PageNotFound noHandlerFound警告:在名稱為“spring-dispatcher”的 DispatcherServlet 中找不到具有 URI [/First_Spring_MVC/welcome] 的 HTTP 請求的映射這是我的 web.xml 文件:<?xml version="1.0" encoding="UTF-8"?><web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">  <display-name>First_Spring_MVC</display-name>  <servlet>    <servlet-name>spring-dispatcher</servlet-name>    <servlet-class>    org.springframework.web.servlet.DispatcherServlet  </servlet-class>  </servlet>  <servlet-mapping>    <servlet-name>spring-dispatcher</servlet-name>    <url-pattern>/</url-pattern>  </servlet-mapping></web-app>這是 spring-dispatcher-servlet.xml:<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans"    xmlns:context="http://www.springframework.org/schema/context"    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    xmlns:mvc="http://www.springframework.org/schema/mvc"    xsi:schemaLocation="http://www.springframework.org/schema/beans    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd    http://www.springframework.org/schema/context    http://www.springframework.org/schema/context/spring-context-3.0.xsd    http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"><context:component-scan base-package="com.webapp.helloController" /> <bean id="viewResolver"    class="org.springframework.web.servlet.view.InternalResourceViewResolver" >        <property name="prefix">            <value>/WEB-INF/</value>        </property>        <property name="suffix">            <value>.jsp</value>        </property>    </bean> </beans>
查看完整描述

1 回答

?
縹緲止盈

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

您正在掃描錯(cuò)誤的包裹。改變 :

<context:component-scan base-package="com.webapp.helloController" />

<context:component-scan base-package="com.app.helloController" />

在您的情況下,還要確保您點(diǎn)擊了正確的網(wǎng)址:

http://localhost:{your_port_num}/First_Spring_MVC/welcome


查看完整回答
反對 回復(fù) 2022-06-04
  • 1 回答
  • 0 關(guān)注
  • 90 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號

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