freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

通過(guò)代碼實(shí)例跟我學(xué)ssh三大框架相互整合的應(yīng)用技術(shù)(第3部分)——使用spring的actionsupport整合struts和spring的應(yīng)用實(shí)例(文件)

 

【正文】 onServlet. This context will automatically refer to the root WebApplicationContext (loaded by ContextLoaderListener/Servlet) as parent. The default namespace of the WebApplicationContext is the name of the Struts ActionServlet, suffixed with servlet (. actionservlet). The default location of the XmlWebApplicationContext configuration file is therefore /WEBINF/. plugin className=/The location of the context configuration files can be customized through the contextConfigLocation setting, analogous to the root WebApplicationContext and FrameworkServlet contexts. plugin className= setproperty property=contextConfigLocation value=/WEBINF/ /WEBINF// /plugin ( 2)本例的配置標(biāo)簽 plugin className= setproperty property=contextConfigLocation value=/WEBINF// /plugin 創(chuàng)建 WebApplicationContext 的配置文件 在該 文件中實(shí) 現(xiàn)本系統(tǒng)的各個(gè)業(yè)務(wù)組件 Bean 的各個(gè)配置。 可以從 samples/petclinic/war/WEBINF/ 拷貝一份模板文件到本W(wǎng)eb應(yīng)用的 WEBINF 目錄中。 在本 Project 中添加一個(gè)實(shí)現(xiàn)用戶登錄功能檢查的業(yè)務(wù)組件 UserLoginBusiness 類 ( 1)添加一個(gè)業(yè)務(wù)組件的接口 楊教授工作室 精心創(chuàng)作的優(yōu)秀程序員 職業(yè)提升必讀系列資料 楊教授工作室,版權(quán)所有,盜版必究 , 11/21 頁(yè) package strutsspringweb。 return okOrNot。 ( 1) POJO 類型的 UserInfo 類 楊教授工作室 精心創(chuàng)作的優(yōu)秀程序員 職業(yè)提升必讀系列資料 楊教授工作室,版權(quán)所有,盜版必究 , 13/21 頁(yè) ( 2)在該類中添加與用戶信息相關(guān)的各個(gè)屬性 楊教授工作室 精心創(chuàng)作的優(yōu)秀程序員 職業(yè)提升必讀系列資料 楊教授工作室,版權(quán)所有,盜版必究 , 14/21 頁(yè) ( 3) UserInfo 最終為 楊教授工作室 精心創(chuàng)作的優(yōu)秀程序員 職業(yè)提升必讀系列資料 楊教授工作室,版權(quán)所有,盜版必究 , 15/21 頁(yè) package strutsspringweb。 private int userAge。 public UserInfo() { } public String getUserName(){ return userName。 } public int getUserAge(){ return userAge。 } public int getUserKind(){ return userKind。 } 楊教授工作室 精心創(chuàng)作的優(yōu)秀程序員 職業(yè)提升必讀系列資料 楊教授工作室,版權(quán)所有,盜版必究 , 17/21 頁(yè) } 改寫前面的 UserLoginAction 類以從 類來(lái)繼承 ( 1)主要實(shí)現(xiàn)的要求 我們只要把自己的 Action 繼承自 ActionSupport,就 是可以調(diào)用 ActionSupport 中g(shù)etWebApplicationContext()的方法取出 WebApplicationContext。 import 。 String userPassword = (()).trim()。 (userName)。 } } } 編程實(shí)現(xiàn)用戶登錄功能的業(yè)務(wù)處理組件類 UserLoginBusiness 中的 doBusiness()方法 package strutsspringweb。 if((yang)amp。 } return okOrNot。 ? ContextLoaderPlugIn 的內(nèi)部實(shí)現(xiàn) 通過(guò)查看 ContextLoaderPlugIn 的源碼,我們可以發(fā)現(xiàn),原來(lái) ContextLoaderPlugIn 仍然是把 WebApplicationContext 放在 ServletContext 中,只是這個(gè) KEY 不太一樣了,這個(gè) KEY值為 +()(具體請(qǐng)查看源代碼)。 1點(diǎn)評(píng) 這種技術(shù)很簡(jiǎn)單并且易于理解。 。 因?yàn)椋?如果 我們 想替換掉 Spring,那么 我們 必須重寫代碼。 ? 在某個(gè) Action 類中提供一個(gè) getServletContextInAction() public getServletContextInAction() {
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1