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

正文內(nèi)容

基于ssh電子商城的課程設(shè)計(jì)畢業(yè)論文-在線瀏覽

2024-08-07 18:45本頁面
  

【正文】 ,負(fù)責(zé)打開、關(guān)閉和管理Session。Spring的loc容器提供了這種方式,通過配置文件的配置管理SessionFactory實(shí)例,使用Spring管理Session對象,使用Spring實(shí)現(xiàn)聲明式的事務(wù)管理。 在Spring的配置文件ApplicationContext.xml中配置Hibernate對SessionFactory的設(shè)置。 bean id=sessionFactory class= property name=dataSource ref=dataSource/ ! 配置hibernate的其他的屬性 property name=hibernateProperties props prop key=/prop prop key=true/prop prop key=true/prop prop key=update/prop /props /property ! 配置Hibernate的映射文件 property name=mappingResources list value/itcast/shop/user/vo//value /list /property /bean當(dāng)Spring的IoC容器配置了SessionFactory Bean,它隨應(yīng)用的部署啟動(dòng)而加載,可以利用Spring依賴注入特性將該Bean注入其它Bean。使用Spring中的HibernateDaosupport和HibernateTemplate類簡化Hibernate DAO實(shí)現(xiàn)類的編寫,完成數(shù)據(jù)持久化的操作。Spring可以采用編程式和聲明式兩類事務(wù)管理。可以在Spring中使用注解式的聲明式事務(wù)管理: ! 配置事務(wù)管理器 bean id=transactionManager class= property name=sessionFactory ref=sessionFactory/ /bean ! 注解事務(wù)驅(qū)動(dòng) tx:annotationdriven transactionmanager=transactionManager/Spring也提供了MVC模式的支持,但Struts是比較單純的MVC框架,開發(fā)中更傾向Spring和Struts整合開發(fā)。整合關(guān)鍵點(diǎn)是:將Struts中的Action的實(shí)例生成不再由Struts負(fù)責(zé),而交給Spring容器管理,主要目的是讓控制器與業(yè)務(wù)邏輯組件實(shí)現(xiàn)分離。Struts只單純扮演控制器的角色。Struts的核心控制器必須能裝載Spring的應(yīng)用程序環(huán)境。在進(jìn)行三者整合開發(fā)時(shí),一般可以采取由上往下和由下往上的分層開發(fā)的原則,多數(shù)實(shí)際項(xiàng)目開發(fā),往往采用后者的開發(fā)模式,即:(1)從底層開發(fā),先開發(fā)領(lǐng)域?qū)ο?,即一些?shí)體類,這些領(lǐng)域?qū)ο髸?huì)在各層之間進(jìn)行傳遞,利用Hibernate做好領(lǐng)域?qū)ο蠛蛿?shù)據(jù)庫表的映射關(guān)系。它是專門獨(dú)立出來對數(shù)據(jù)進(jìn)行持久化,即處理數(shù)據(jù)的CRUD操作,也是利用Spring對Hibernate提供的DAO支持類HibernateDaoSupport來實(shí)現(xiàn)的。(3)Service層的開發(fā)。(4)Action層開發(fā)。目前java世界里分頁方法有很多,針對不同的用途分頁也不同,所采用的分頁原理也不一樣。有些分頁方法則是根據(jù)當(dāng)前頁的首ID和尾ID號來確定上一頁和下一頁的內(nèi)容,每次點(diǎn)擊上一頁或下一頁都去數(shù)據(jù)庫把相應(yīng)的數(shù)據(jù)查詢出來,這種做法是提高了查詢的速度,但是每次查詢都要訪問數(shù)據(jù)庫,增加了數(shù)據(jù)庫服務(wù)器的負(fù)擔(dān),運(yùn)行效率不高。采用此種分頁方法既減少于數(shù)據(jù)庫的訪問,又提高了數(shù)據(jù)查詢速度,可謂是一舉兩得。本系統(tǒng)數(shù)據(jù)庫開發(fā)定義名詞如下: 1. ‘*’:主關(guān)鍵字符號; 2. ‘PK’:主關(guān)鍵字縮寫;3. ‘+’:外關(guān)鍵字符號; 4. ‘FK’:外關(guān)鍵字縮寫; 5. ‘a(chǎn)mp。前臺(tái)功能包括:首頁、用戶登錄注冊、一級分類顯、商品詳情顯示、購物車、訂單操作、在線付款。 前臺(tái)首頁:注冊頁面:登錄頁面:分類頁面:商品詳情頁面:購物車頁面:訂單頁面:核心配置文件: ! 配置Spring的核心監(jiān)聽器 listener listenerclass/listenerclass /listener contextparam paramnamecontextConfigLocation/paramname paramvalueclasspath:/paramvalue /contextparam ! 配置Struts2的核心過濾器 filter filternamestruts2/filtername filterclass/filterclass /filter filtermapping filternamestruts2/filtername urlpattern/*/urlpattern dispatcherREQUEST/dispatcher dispatcherFORWARD/dispatcher /filtermappingstruts constant name= value=false / package name=shop extends=strutsdefault namespace=/ ! 配置自定義攔截器 interceptors interceptor name=privilegeInterceptor class=/ /interceptors globalresults result name=msg/WEBINF/jsp//result result name=login/admin//result /globalresults ! 配置首頁訪問的Action action name=index class=indexAction result name=index/WEBINF/jsp//result /action ! 配置用戶模塊的Action action name=user_* class=userAction method={1} result name=registPage/WEBINF/jsp//result result name=input/WEBINF/jsp//result result name=loginPage/WEBINF/jsp//result result name=login/WEBINF/jsp//result result name=loginSuccess type=redirectActionindex/result result name=quit type=redirectActionindex/result result name=checkcodeFail/WEBINF/jsp//result /action ! 驗(yàn)證碼Action action name=checkImg class=checkImgAction/action ! 商品模塊的Action action name=product_* class=productAction method={1} result name=findByPid/WEBINF/jsp//result result name=findByCid/WEBINF/jsp//result result name=findByCsid/WEBINF/jsp//result /action ! 購物車的Action action name=cart_* class=cartAction method={1} result name=addCart/WEBINF/jsp//result result name=clearCart/WEBINF/jsp//result result name=removeCart/WEBINF/jsp//result result name=myCart/WEBINF/jsp//result /action ! 訂單的Action action name=order_* class=orderAction method={1} result name=saveOrder/WEBINF/jsp//result result name=findByUid/WEBINF/jsp//result result name=findByOid/WEBINF/jsp//result result name=updateStateSuccess type=redirectAction?page=1/result /action ! 后臺(tái)登錄Action action name=adminUser_* class=adminUserAction method={1} result name=loginFail/admin//result result name=loginSuccess type=redirect/admin//result interceptorref name=privilegeInterceptor param name=excludeMethodslogin/param /interceptorref interceptorref name=defaultStack/ /action ! 后臺(tái)一級分類管理Action action name=adminCategory_* class=adminCategoryAction method={1} result name=findAll/admin/category//result result name=saveSuccess type=redirectActionadminCategory_findAll/result result name=deleteSuccess type=redirectActionadminCategory_findAll/result result name=editSuccess/admin/category//result result name=updateSuccess type=redirectActionadminCategory_findAll/result interceptorref name=privilegeInterceptor/ interceptorref name=defaultStack/ /action ! 后臺(tái)二級分類管理Action action name=adminCategorySecond_* class=adminCategorySecondAction method={1} result name=findAll/admin/categorysecond//result result name=addPage/admin/categorysecond//result result name=saveSuccess type=redirectActionadminCategorySecond_fi
點(diǎn)擊復(fù)制文檔內(nèi)容
規(guī)章制度相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1