日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 前端技术 > javascript >内容正文

javascript

java mvc 菜鸟_Spring MVC 简单入门

發布時間:2023/12/31 javascript 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 java mvc 菜鸟_Spring MVC 简单入门 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1331601238 盧久貴

web.xml?配置:

dispatcher

org.springframework.web.servlet.DispatcherServlet

加載/WEB-INF/spring-mvc/目錄下的所有XML作為Spring MVC的配置文件

contextConfigLocation

/WEB-INF/spring-mvc/*.xml

1

dispatcher

*.htm

這樣,所有的.htm的請求,都會被DispatcherServlet處理;

初始化 DispatcherServlet 時,該框架在 web 應用程序WEB-INF 目錄中尋找一個名為[servlet-名稱]-servlet.xml的文件,并在那里定義相關的Beans,重寫在全局中定義的任何Beans,像上面的web.xml中的代碼,對應的是dispatcher-servlet.xml;當然也可以使用元素,手動指定配置文件的路徑;

dispatcher-servlet.xml?配置:

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:mvc="http://www.springframework.org/schema/mvc"

xmlns:p="http://www.springframework.org/schema/p"

xmlns:context="http://www.springframework.org/schema/context"

xmlns:aop="http://www.springframework.org/schema/aop"

xmlns:tx="http://www.springframework.org/schema/tx"

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/aop

http://www.springframework.org/schema/aop/spring-aop-3.0.xsd

http://www.springframework.org/schema/tx

http://www.springframework.org/schema/tx/spring-tx-3.0.xsd

http://www.springframework.org/schema/mvc

http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd

http://www.springframework.org/schema/context

http://www.springframework.org/schema/context/spring-context-3.0.xsd">

class="org.springframework.web.servlet.view.InternalResourceViewResolver"

p:prefix="/WEB-INF/jsp/"

p:suffix=".jsp" />

總結

以上是生活随笔為你收集整理的java mvc 菜鸟_Spring MVC 简单入门的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。