锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲性猛交xx乱,国产成人亚洲精品电影,亚洲AV无码成人精品区天堂 http://www.tkk7.com/wolfsquare/category/5637.htmlzh-cn Wed, 28 Feb 2007 17:26:52 GMT Wed, 28 Feb 2007 17:26:52 GMT 60 鍥炲 涔卞脊鏉冮檺緋葷粺緇竴 http://www.tkk7.com/wolfsquare/archive/2006/07/04/56606.htmlwolfsquare wolfsquare Tue, 04 Jul 2006 14:45:00 GMT http://www.tkk7.com/wolfsquare/archive/2006/07/04/56606.html http://www.tkk7.com/wolfsquare/comments/56606.html http://www.tkk7.com/wolfsquare/archive/2006/07/04/56606.html#Feedback 1 http://www.tkk7.com/wolfsquare/comments/commentRss/56606.html http://www.tkk7.com/wolfsquare/services/trackbacks/56606.html
涔卞脊鏉冮檺緋葷粺緇竴
鍘熸枃鍦ㄨ繖:http://www.tkk7.com/RongHao/archive/2006/07/03/56258.html 浠旂粏鍒嗘瀽涓,浜?涓?鍥涙潈闄愯儗鍚庣殑瀹炶川鍙互鍙戠幇: 涓緋葷粺鏉冮檺鐨勬蹇墊湁涓浜涘啑浣?寰堥毦鎯寵薄榪欐牱涓縐嶆儏鍐?浣犲凡緇忔湁浜嗗瓙緋葷粺涓嬬殑寰堝鏉冮檺,緇撴灉鍥犱負娌℃湁妯″潡鏉冮檺鑰屼嬌寰楁棤娉曚嬌鐢ㄨ妯″潡榪涜浠諱綍鎿嶄綔,鍒嗛厤鏉冮檺鐨勪漢瑕侀潪甯稿皬蹇冩墠琛?榪欎釜涓栫晫宸茬粡澶熷鏉備簡,涓嶈鍐嶇粰寮鍙?閮ㄧ講浜哄憳澧炲姞澶嶆潅搴︿簡.寰堟槑鐧界殑,榪欎釜鏉冮檺鏄笉闇瑕佽祫婧愮殑鏉冮檺 浜屾暟鎹簱鎿嶄綔鏉冮檺鐨勬蹇?鏈変竴鐐圭枒鎯?涓嶇煡閬撲負浠涔堣寤虹珛榪欐牱鐨勪竴涓蹇?鍜岃綰ф潈闄愭湁浠涔堝尯鍒憿? 浠庝綘鐨勪笂涓嬫枃鐞嗚В鏉ョ湅,浼間箮鏄繖鏍峰瓙鐨?鏈夋搷浣淴琛ㄧ殑涓氬姟,濡傛灉鐢ㄦ埛鏈夊鍔犳潈闄?鍒欏彲浠ヤ換鎰忓鍔犳暟鎹?濡傛灉鐢ㄦ埛鏈夌紪杈戞潈闄?鍒欏彲浠ョ紪杈戜換鎰忔暟鎹?瀹為檯涓婂搴旀爣鍑嗘潈闄愭ā鍨嬩負:涓嶉渶瑕侀檺瀹氳祫婧愮殑鎿嶄綔,鍗充笉闇瑕佽祫婧愭爣璇嗙殑鏉冮檺. 涓夎綰ф暟鎹潈闄?榪欎釜姒傚康寰堢洿鐧?瀵瑰簲鏍囧噯鏉冮檺妯″瀷灝辨槸: 璧勬簮(琛屾暟鎹?+鎿嶄綔 鍥涘垪綰ф暟鎹潈闄?鐢變簬涓嶆槸閽堝鏌愮壒瀹氳鏁版嵁,鎵浠ュ畠涔熸槸鏃犺祫婧愬瀷鏉冮檺 灝辮繖鏍?鎵鏈夌殑鏉冮檺鏈緇堝彲鍒掍負闇瑕佽祫婧愭爣璇嗗拰涓嶉渶瑕佽祫婧愭爣璇?鎹㈠彞璇濊,鎵鏈夋潈闄愬彲鍒掑垎涓烘帶鍒舵煇浜涢泦鍚堢殑鏉冮檺鍜屾帶鍒跺崟浣撶殑鏉冮檺涓ょ,鍦ㄦ煇浜涙椂鍊?涔熺О涔嬩負 鍔熻兘鏉冮檺鍜屾暟鎹潈闄?/p>
璋堝埌鎶婃潈闄愬垎緇欏埆浜?寰堣嚜鐒剁殑灝辨槸濡備綍鎺у埗鏉冮檺鐨勬潈闄愮殑闂浜?寰堟嫍鍙?鏄惂?浠旂粏鎯蟲兂,榪欐牱寰堢洿瑙?涔熸病鏈変粈涔堝悗閬楃棁,鏉冮檺鑷掑綊鎺у埗鍜岃嚜瑙i噴,鐪熸槸涓涓畬緹庣殑寰幆. 鏈夌埍鎬濊冪殑鍚屽鎯蟲繁浜?浼氳寰楅潪甯擱夯鐑?闅懼疄鐜?褰撶劧,姒傚康涓婁竴鍥炰簨,鍏蜂綋瀹炵幇涓婂彲浠ユ槸鍙︿竴鍥炰簨,鍙互鍋氬緢澶氱殑鍙橀氭潵杈懼埌鐩殑.鍙淇濇寔姒傚康涓婄殑綆鍗曟?灝辮凍浠ヤ嬌寰楅潪甯稿鐨勪漢寰椾互瑙h劚浜嗐?/p>
鍙﹀錛屼綔涓烘灦鏋勮璁¤咃紝闈炲父闈炲父涓嶈禐鎴愬姩杈勫氨鎶婂緢搴曞眰鐨勬蹇墊壇榪涢珮灞傝璁′腑錛堜緥濡傝綰э紝鏁版嵁搴撲粈涔堢殑錛夛紝寰堝鏄撴妸鑷繁鍜屽埆浜烘悶鑳℃秱銆?br />鍙互鏈榪戠姸鎬佷笉濂斤紝瑕佷笉濂藉ソblog涓綃囷紝8榪囷紝鏈夊彞璇濇庝箞璇存潵鐫錛氣滈兘绱犻偅嫻簯鑰屽凡銆傘傘傗?/p>
]]> 涓嶅畬緹庣殑涓栫晫錛嶇湅鍒頒簡IOC宸ュ叿鐨勫張涓涓彂灞曟柟鍚?/title> http://www.tkk7.com/wolfsquare/archive/2006/06/08/51227.htmlwolfsquare wolfsquare Wed, 07 Jun 2006 16:30:00 GMT http://www.tkk7.com/wolfsquare/archive/2006/06/08/51227.html http://www.tkk7.com/wolfsquare/comments/51227.html http://www.tkk7.com/wolfsquare/archive/2006/06/08/51227.html#Feedback 7 http://www.tkk7.com/wolfsquare/comments/commentRss/51227.html http://www.tkk7.com/wolfsquare/services/trackbacks/51227.html 闃呰鍏ㄦ枃 ]]> 緇撳悎WebWork瀹炵幇楂樺鐢ㄥ害緋葷粺鐨勬帰绱?涓? http://www.tkk7.com/wolfsquare/archive/2006/05/17/46710.htmlwolfsquare wolfsquare Wed, 17 May 2006 15:40:00 GMT http://www.tkk7.com/wolfsquare/archive/2006/05/17/46710.html http://www.tkk7.com/wolfsquare/comments/46710.html http://www.tkk7.com/wolfsquare/archive/2006/05/17/46710.html#Feedback 0 http://www.tkk7.com/wolfsquare/comments/commentRss/46710.html http://www.tkk7.com/wolfsquare/services/trackbacks/46710.html 闇姹? 鏌愭満鏋勪綋緋諱笅,鏈烘瀯綾誨瀷鍒嗕負瀛愬叕鍙?閮ㄩ棬,浜哄憳絳?浠ュ悗鍙兘鍦ㄦ煇鏈烘瀯鎴栬呭叾瀛愬瓩鏈烘瀯涓嬪彲鑳戒細鍐嶅垎鍑哄叾浠栧瓙鏈烘瀯綾誨瀷,甯屾湜鍦ㄥ鍔犳柊綾誨瀷榪囩▼涓?灝藉彲鑳界殑閬垮厤淇敼宸叉湁浠g爜銆?/p>
鎯呭喌錛氬瓙鍏徃錛岄儴鍒嗭紝浜哄憳絳夊凡瀹屾垚鎵鏈夌紪鐮侊紙鐣岄潰錛屽晢涓氶昏緫錛屾暟鎹昏緫錛?br />鍙樺寲錛氶渶瑕佹妸榪欎釜鏈烘瀯浣撶郴緇勬垚涓轟竴棰楁爲鐘剁粨鏋?br />絳栫暐錛氶壌浜庨櫎浜嗘爲緇撴瀯澶栫殑鍏朵粬閮ㄥ垎浠g爜宸茬粡瀹屾垚錛岄偅涔堝簲璇ラ鍏堜繚鎸佽繖浜涗唬鐮佷笉浜堟敼鍔ㄣ傚鐢ㄤ慨鏀圭殑浼樺厛綰т粠楂樺埌浣庣殑欏哄簭濡備笅錛?br />聽 鐣岄潰脳JSP錛孉ction灞?br />聽 鍟嗕笟閫昏緫 Service灞?br />聽 鏁版嵁閫昏緫灞?br />聽 鏁版嵁鐗╃悊灞?br />鏈夌粡楠岀殑浜虹煡閬擄紝澶ч儴鍒嗘儏鍐典笅錛岃秺鏄笅灞傜殑鏀瑰姩錛岃秺鏄獎鍝嶈秺騫挎硾錛堟敞鎰忎笉鏄慨鏀歸毦搴︼級錛屾墍浠ユ垜浠彧鏈夊湪鏃犺鍙柦鐨勬儏鍐典笅錛屾墠榪涜浣庡眰鐨勪慨鏀廣?/p>
鍒嗘瀽: 鍥炲埌鎴戜滑鐨勯渶姹?浠庡姛鑳戒笂鐪嬶紝緇存姢涓涓粍緇囨満鏋勭殑闇姹傦紝宸茬粡娑電洊浜嗘瘡涓涓瓙緇撴瀯鐨勭淮鎶ら渶姹傦紝浠ラ儴闂ㄧ殑寤虹珛涓轟緥錛屽湪鏂板緩涓涓儴闂ㄦ椂錛屽悓鏃朵篃蹇呴』寤虹珛鏈烘瀯鏍戜笂鐨勮妭鐐癸紝 聽榪欐牱錛屽鏋滈渶瑕佺洿鎺ヤ嬌鐢ㄥ師鏈夌殑鍒涘緩閮ㄩ棬鐨勬墍鏈変唬鐮侊紝闇瑕佸湪鍏朵笂鍔犱笂鍒涘緩緇勭粐鏈烘瀯鎵闇瑕佺殑鐖惰妭鐐癸紝浠ュ強褰撳墠鑺傜偣鍚嶇О淇℃伅(鍦ㄨ繖閲宒epartment鐨勫鍔犵晫 闈SP鏄渶瑕佷慨鏀圭殑,涓嶈繃瀹為檯涓婃垜娌℃湁淇敼璇ユ枃浠?鑰屾槸鍒╃敤DHTML鏉ュ姩鎬佸姞鍏ラ渶瑕佹柊澧炲姞鐨勪俊鎭?,鐒跺悗鎻愪氦緇欏師鍒涘緩閮ㄩ棬鐨刄RI 錛坉epartmentSave.action錛夊拰緇勭粐鏈烘瀯鍒涘緩URI(orgCreate.action)錛屽湪榪欓噷鎴戜滑鍒╃敤ww鎻愪緵鐨刟ction chain鍔熻兘鏉ュ畬鎴愯繖涓や釜鎿嶄綔銆?br />聽榪欓噷闇瑕佷慨鏀筪epartment.action鐨勯厤緗?鎷︽埅save鏂規硶浣垮叾鎵ц瀹屽悗璺寵繃鍘熸潵鐨剅elist緇撴灉欏甸潰杞悜緇勭粐緇撴瀯鐨勫垱寤簅rgCreate.action錛?br />聽<action name="unitSave" class="com.wolfsquare.ibase.org.action.UnitAction" method="save"> 聽聽 <result name="input">/org/unit/input.jsp</result> 聽聽 <result name="relist" type="chain"> 聽聽聽聽聽聽 <param name="actionName">orgCreate</param> 聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 <param name="namespace">/org</param>聽聽 聽聽聽聽聽聽聽聽聽聽聽 </result> 聽聽 <result name="xxx" type="redirect">/org/unit.action?start=${start}</result> 聽聽 <interceptor-ref name="validationStack"/> 聽 </action> 鍙兘鏈夊悓瀛︾湅鍒拌繖閲屼細闂細鍒涘緩緇勭粐鑺傜偣鏃跺簲璇ヨ繕闇瑕佸叧鑱斿墠闈㈠垱寤虹殑閮ㄩ棬瀵硅薄鍟婏紝榪欎釜鎿嶄綔鏄浣曞疄鐜扮殑錛熶俊鎭槸濡備綍浼犻掔殑錛?br />鍦ㄨ繖閲岋紝鐢變簬鏁翠釜鏋舵瀯浣撶郴騫舵病鏈夋敮鎸佽繖縐嶄俊鎭紶閫掔殑鍔熻兘錛屾墍浠ュ彧濂戒互涓縐嶆瘮杈冣濊剰鈥滅殑鏂瑰紡瀹炵幇錛?br />聽聽聽聽聽聽聽 鍦╠epartment.action綾婚噷澧炲姞浜嗕竴涓柟娉昰etModel()榪斿洖鍒氬垰鍒涘緩鐨勯儴闂ㄥ璞★紝鐒跺悗鍦╫rg.action綾諱腑澧炲姞涓涓帴鏀剁殑鏂規硶setModel(object o)榪欐牱鍦ㄦ暣action chain鎵ц鐨勬椂鍊欙紝ww浼氳嚜鍔ㄥ皢getModel鍚庣殑鏁版嵁濉叆setModel涓紝榪欐牱鍋氱殑鍚庢灉鏄互鍚庡鍔犳柊鐨勬満鏋勭被鍨嬬殑鍔熻兘鏃訛紝action蹇呴』涔熺収榪欐牱鐨勮鎰忚緗甮etModel鏂規硶銆傦紙濡傛灉瑕佽В鍐寵繖涓棶棰橈紝榪欒兘闇瑕佷嬌鐢ㄤ竴涓壒瀹氱殑Context錛岀劧鍚庢嫤鎴寚瀹歋ervice鐨勫垱寤烘柟娉曪紝鎶婂垱寤虹粨鏋滄斁鍏ontext錛屼笉榪囪繖鍙堝甫鏉ュ浣曟竻闄ontext鐨勯棶棰橈紝浜庢槸鍙堣姹傚姪涓巜w鐨刬nterspector錛屼笓闂ㄥ啓涓涓嫤鎴櫒鏉ユ摝灞佽偂錛屽楹葷儲銆傘傘傦級
聽聽聽聽聽聽聽 灝辮繖鏍?鎴戜滑瀹屾垚浜嗘柊澧烇紝淇敼緇勭粐鏈烘瀯鐨勫姛鑳藉悎鎴?铏界劧鏈夌偣鎷栨矒,浣嗘槸榪樻槸杈懼埌浜嗗鐢?灝戜慨鏀瑰師鏈変唬鐮?鑰屼笖鎵╁睍鎬т篃寰堝ソ鐨勭洰鏍囥傝繖涓婄瘒璇寸殑鏄袱涓畝鍗曚笟鍔$殑鍔熻兘鎻夊悎闂,涓嬬瘒鎴戜滑鏉ョ湅鐪嬬◢寰鏉傜偣鐨勬儏鍐?鐪嬬湅榪樿兘涓嶈兘緇х畫渚濊懌鑺︾敾鐡㈡潵瀹屾垚鍔熻兘鍚堢殑鎴?br />聽聽 (鏈畬寰呯畫)聽聽
]]> log4j閰嶇疆綆瑕佽鏄?/title> http://www.tkk7.com/wolfsquare/archive/2006/04/20/42242.htmlwolfsquare wolfsquare Thu, 20 Apr 2006 15:21:00 GMT http://www.tkk7.com/wolfsquare/archive/2006/04/20/42242.html http://www.tkk7.com/wolfsquare/comments/42242.html http://www.tkk7.com/wolfsquare/archive/2006/04/20/42242.html#Feedback 0 http://www.tkk7.com/wolfsquare/comments/commentRss/42242.html http://www.tkk7.com/wolfsquare/services/trackbacks/42242.html 鐒惰岀敤google鎼滀簡涓涓嬶紝鍗村彂鐜扮綉涓婃病鏈変竴涓畝鍗曠洿瑙傜殑璇存槑錛屼簬鏄彧濂界湅log4j鐨勫畼鏂逛粙緇?緇堜簬 鐞嗚В浜唋og4j鐨勯厤緗敤娉曪紝浠ヤ笅鏄垜瀵筶og4j閰嶇疆鐨勪竴鐐硅璇嗭紝濡傛湁璋榪樿涓嶅悵璧愭暀.
棣栧厛鎴戜滑鎼炴竻妤歭og4j鑳藉共浠涔堬紝綆鍗曟潵璇村氨鏄彁渚涗竴涓褰曚笉鍚岀駭鍒俊鎭唴瀹圭殑鏃ュ織宸ュ叿錛?br />鍙互鎶婁笉鍚岀駭鍒紝涓嶅悓鍖呰礬寰勭殑淇℃伅錛屼互鎸囧畾鏍煎紡杈撳嚭鍒板縐嶈澶囷紙鎺у埗鍙幫紝鏂囦歡絳夛級 鍦ㄧ▼搴忎腑錛屽彲浠ヤ互浠ヤ笅鏂瑰紡鏉ヤ嬌鐢?br />聽聽 Log log = org.apache.commons.logging.LogFactory.LogFactory.getLog(yourClassName.class); 聽聽log.debug("debug message -------------------"); 聽聽log.info("info message ******************"); 聽聽log.warn("warn message +++++++++++++++"); 聽聽log.error("error msg================="); 聽聽 鏈枃涓昏璁茬殑鏄浣曢厤緗甽og4j錛屽厛璁╂垜浠厛鐪嬬湅涓涓吀鍨嬬殑log4j閰嶇疆錛毬犅?
==========log4j.properties==================
log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d{MM-dd HH\:mm\:ss.SSS} %-5p [%F\:%L]%x %m%n
log4j.appender.fileout=org.apache.log4j.RollingFileAppender log4j.appender.fileout.File=D:/workspace/log4jtest/log/application.log log4j.appender.fileout.MaxFileSize=10000KB log4j.appender.fileout.MaxBackupIndex=10 log4j.appender.fileout.layout=org.apache.log4j.PatternLayout log4j.appender.fileout.layout.ConversionPattern=%d{MM-dd HH:mm:ss.SSS}[%24F:%-3L:%-5p]%x %m%n
log4j.rootCategory=INFO, stdout, fileout log4j.logger.com.wolfsquare.log2=DEBUG,stdout ===================================
榪欎釜鏂囦歡鍙互鍒掍負涓夊皬鍧?/p>
===========絎竴鍧楀畾涔変簡涓涓悕涓?stdout 鐨刟ppender鍜宭ayout (appender,layout鐨勬蹇靛悗闈㈠啀瑙i噴錛岀洰鍓嶅厛璁扮潃鏈夎繖鏍蜂袱涓悕璇?錛?/p>
log4j.appender.stdout=org.apache.log4j.ConsoleAppender 瀹氫箟stdout鐨勫疄闄呰緭鍑哄疄鐜扮被錛屼粠榪欎釜appender瀹炵幇綾誨悕鍙互鐚滃埌錛岃繖涓被鏄礋璐f帶鍒跺彴杈撳嚭鐨勩?br />log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 瀹氫箟stdout鐨勮緭鍑鴻楗板櫒 log4j.appender.stdout.layout.ConversionPattern=%d{MM-dd HH\:mm\:ss.SSS} %-5p [%F\:%L]%x %m%n 瑁呴グ鍣ㄥ弬鏁伴厤緗?/p>
============絎簩鍧楀畾涔変簡涓涓悕涓?fileout 鐨刟ppender鍜宭ayout: log4j.appender.fileout=org.apache.log4j.RollingFileAppender 鍚岀悊鍙寽榪欎釜瀹炵幇綾繪槸杈撳嚭鍒版枃浠剁殑 log4j.appender.fileout.File=D:/workspace/log4jtest/log/application.log log4j.appender.fileout.MaxFileSize=10000KB log4j.appender.fileout.MaxBackupIndex=10 log4j.appender.fileout.layout=org.apache.log4j.PatternLayout log4j.appender.fileout.layout.ConversionPattern=%d{MM-dd HH:mm:ss.SSS}[%24F:%-3L:%-5p]%x %m%n
============絎笁鍧楀畾涔変簡鍚嶅瓧鍒嗗埆涓簉ootCategory,log4j.logger.com.wolfsquare.log2鐨勪袱涓猯ogger log4j.rootCategory=INFO, stdout, fileout log4j.logger.com.wolfsquare.log2=DEBUG,stdout
rootCategory logger鏄己鐪佺殑logger錛岃褰曟墍鏈夌殑鍖呯殑淇℃伅杈撳嚭銆?br />絎簩涓猯ogger鏄彧杈撳嚭鎸囧畾鍖卌om.wolfsquare.log2涓嬬殑鏃ュ織淇℃伅銆?br />閭d箞INFO,DEBUG鍙堟槸浠涔堟剰鎬濆憿錛屼粬浠槸淇℃伅鐨勫垎綰ф爣璇嗭紝閫氳繃緇ф壙瀹炵幇榪欎釜瀹炵幇鑷畾涔夌駭鍒殑鍒嗙駭銆?br />絎笁鍧楅厤緗袱鍙ョ殑鎰忔濇槸榪欐牱鐨勶細 rootCategory 鎶婃墍鏈夌被鐨処NFO綰у埆浠ヤ笂鐨勪俊鎭緭鍑哄埌stdout鍜宖ileout涓や釜appender涓紝 logger.com.wolfsquare.log2錛屾妸com.wolfsquare.log2鍖呬腑鐨勬墍鏈夌被錛堝寘鎷瓙鍖咃級DEBUG綰у埆錛堝惈錛変互涓婄殑淇℃伅杈撳嚭鍒皊tdout 涓?br />涓涓猯ogger鍙互杈撳嚭鍒板緢澶氫釜璁懼涓紙appender錛?濡傛灉闇瑕佸鍔犺緭鍑鴻澶囧垯鐢ㄥ垎鍙峰垎闅斿紑appender鍚嶇О鍗沖彲銆?/p>
杈撳嚭淇℃伅鐨勫垎綾葷駭鍒槸DEBUG > INFO > WARN > ERROR,淇℃伅緇嗚妭鐢辯粏鍒扮矖錛屾寚瀹氳緭鍑烘煇涓綰у埆鐨勪俊鎭椂錛?br />榪囩粏鐨勪俊鎭緭鍑哄皢浼氳蹇界暐
濡傛灉涓涓厤緗腑鏈夊涓猯ogger錛屼粬浠箣闂翠細鏈変粈涔堝叧緋誨憿錛熺瓟妗堟槸錛屽湪杈撳嚭涓婏紝浠栦滑娌℃湁浠諱綍鍏崇郴錛岄兘鏄嫭绔嬭繍浣滅殑錛?br />涓嶇浉鍏崇殑錛屼絾鏄湪閰嶇疆涓婏紝鐖跺寘鐨勯厤緗細浼犵粰瀛愬寘錛屽鏋滃瓙鍖呮病鏈夊彟澶栧畾涔夐厤緗殑璇濄?br />渚嬪涓婇潰閰嶇疆鏂囦歡涓殑涓や釜logger錛?br />log4j.logger.com.wolfsquare log4j.logger.com.wolfsquare.log2
榪欓噷璁や負 log4j.logger.com.wolfsquare.log2 緇ф壙鑷?log4j.logger.com.wolfsquare錛屼粬浠殑閰嶇疆澹版槑濡備笅錛?br />log4j.rootCategory=INFO, stdout, fileout log4j.logger.com.wolfsquare.log2=,stdout 娉ㄦ剰絎簩鍙ユ病鏈夋寚瀹氳緭鍑虹駭鍒?閭d箞鏍規嵁閰嶇疆緇ф壙瑙勫垯浼氱戶鎵跨埗logger鐨勯厤緗紝鍦ㄨ繖閲屽氨鏄疘NFO銆?/p>
鍚屾椂闇瑕佸己璋冪殑鏄紝濡傛灉涓や釜logger鏈夌戶鎵垮叧緋伙紝涓旇緭鍑哄埌鍚屼竴涓猘ppender錛屾牴鎹緭鍑虹嫭绔嬪師鍒欙紝閭d箞灝嗕細鍑虹幇涓よ涓鏍風殑淇℃伅錛?br />渚嬪涓婇潰鐨勪袱涓猯ogger瀹氫箟浼氬鑷磋繖鏍風殑鎯呭喌銆?br />鏈鍚庝互涓騫呭浘鏉ユ鎷細
]]> Spring+Hibernate+Websphere5.0緇忛獙涓鍒?/title> http://www.tkk7.com/wolfsquare/archive/2006/02/07/29749.htmlwolfsquare wolfsquare Tue, 07 Feb 2006 00:50:00 GMT http://www.tkk7.com/wolfsquare/archive/2006/02/07/29749.html http://www.tkk7.com/wolfsquare/comments/29749.html http://www.tkk7.com/wolfsquare/archive/2006/02/07/29749.html#Feedback 0 http://www.tkk7.com/wolfsquare/comments/commentRss/29749.html http://www.tkk7.com/wolfsquare/services/trackbacks/29749.html 鐜Spring1.1.3,Hibernate 2.1.8錛?Websphere5.01
hbm鏂囦歡閲囩敤閫氶厤絎﹁幏鍙栵細
classpath:/**/*.hbm.xml
闂鐥囩姸錛?/P>
搴旂敤鍚姩鎶ラ敊璇翠笉鑳介噸澶嶅畾涔夋煇綾伙紝鍘繪帀璇ョ被鍚庝粛鐒舵姤涓嬩竴涓被閲嶅瀹氫箟銆?/P>
浠旂粏鏌ョ湅Log杈撳嚭鍙戠幇錛屾墍鏈夌殑hbm鏂囦歡鍧囨壘鍒頒簡涓や喚 -_-!!!
欏圭洰緇勮涓哄簲璇ユ槸websphere涓嶅お鍘氶亾錛屽湪classpath涓嬌鐢ㄤ簡澶氬鐩綍(web-inf & classes)錛屽茍浠ヨ繖浜涚洰褰曚負鏍硅繘琛岄掑綊鎼滅儲鍖歸厤鏂囦歡錛屽彲鏄鏋滆繖浜涚洰褰曟湁鍖呭惈鍏崇郴錛學ebSphere灝辨病鏈夊鐞嗛噸澶嶆煡鎵劇殑鏂囦歡浜嗐?/P>
浜庢槸鍦ㄤ互涓婇厤緗腑鏀逛負錛?/P>
classpath:/classes/**/*.hbm.xml
闂铏界劧瑙e喅浜嗭紝鍙槸tomcat涓嵈鍙堟棤鏁堜簡銆?錛氾紙
浠涔堟椂鍊欙紝浼佷笟搴旂敤鎵嶈兘涓嬈℃嫹璐濓紝鍒板榪愯鍟婏綖锝?/P>
]]>淇敼Tds椹卞姩Url澹版槑瑙e喅涓や釜Sql Server闂 http://www.tkk7.com/wolfsquare/archive/2006/02/07/29748.htmlwolfsquare wolfsquare Tue, 07 Feb 2006 00:49:00 GMT http://www.tkk7.com/wolfsquare/archive/2006/02/07/29748.html http://www.tkk7.com/wolfsquare/comments/29748.html http://www.tkk7.com/wolfsquare/archive/2006/02/07/29748.html#Feedback 0 http://www.tkk7.com/wolfsquare/comments/commentRss/29748.html http://www.tkk7.com/wolfsquare/services/trackbacks/29748.html 闂1錛欽DBC Sql Server varchar鐨勫彇鍑烘渶澶ч暱搴﹂檺鍒?/P>
鐜錛?JDBC椹卞姩inet tds椹卞姩(鐗堟湰涓嶆槑),SQLServer2K
闂鐥囩姸錛氬浜庢暟鎹簱澹版槑涓簐archar鐨勯暱搴﹀ぇ浜?56鐨勫瓧孌碉紝鍙互姝e父淇濆瓨錛屼絾鏄棤娉曞彇鍑哄浜?56瀛楃浠ュ悗鐨勫唴瀹?/P>
闂2錛氫嬌鐢℉ibernate鏄犲皠鏃?闀垮害瀛楃涓蹭繚瀛樺悗錛屽彇鍑哄鍔犱簡涓涓┖鏍?/P>
鐜錛歩net tds椹卞姩Hibernate2.1.8,SQL Server2K
闂鐥囩姸錛氫繚瀛?闀垮害瀛楃涓插悗錛屽彇鍑哄鍔犱簡澶氫綑鐨勭┖鏍箋?/P>
浠ヤ笂涓や釜闂閮芥槸鍥犱負娌℃湁浣跨敤鏈鏂扮殑閫氳鍗忚寮曡搗鐨勶紝淇敼URL澹版槑鏂瑰紡濡備笅錛?/P>
jdbc:inetdae7:127.0.0.1:1433?database=xxx
闂瑙e喅錛屾敹宸ャ?/P>
ps:鍙戠幇鍗忚inetdae鏃訛紝鏁版嵁搴撳瓧孌典負Null鏃訛紝Hibernate鍙栧嚭澹版槑涓哄熀鏈被鍨嬶紙渚嬪boolean錛夌殑瀵硅薄灞炴у茍涓嶄細鎶ラ敊錛屽疄闄呬笂鍦ㄥ叾浠栨暟鎹簱濡侽racle鍜屾柊鍗忚涓婃槸浼氭姤閿欑殑銆備負浜嗛伩鍏嶆綾婚棶棰樺嚭鐜幫紝鏈濂借繕鏄弗鏍奸伒瀹堬細Hibernate澹版槑瀵硅薄鐨勫熀鏈被鍨嬪睘鎬э紝涓瀹氫笉鑳藉湪鏁版嵁搴撶緗負絀哄箋?/P>
ps2:鍦ㄨВ鍐充互涓婇棶棰樹腑鍙戠幇,Oracle灞呯劧瀵逛紶浜?闀垮害瀛楃涓詫紝浼氳漿涓虹┖鍊?涓嶇煡閬撴槸涓轟簡鑺傜渷絀洪棿榪樻槸鍒殑浠涔堢悊鐢便?_-!!!
錛?STRONG>鍏ㄦ枃瀹?/FONT>錛?/P> ]]>
Java楂樼簿搴︽墦鍗?/title> http://www.tkk7.com/wolfsquare/archive/2006/02/06/29732.htmlwolfsquare wolfsquare Mon, 06 Feb 2006 13:44:00 GMT http://www.tkk7.com/wolfsquare/archive/2006/02/06/29732.html http://www.tkk7.com/wolfsquare/comments/29732.html http://www.tkk7.com/wolfsquare/archive/2006/02/06/29732.html#Feedback 2 http://www.tkk7.com/wolfsquare/comments/commentRss/29732.html http://www.tkk7.com/wolfsquare/services/trackbacks/29732.html 鍦↗ava鐜涓?鍙互浣跨敤 java.awt.Toolkit.getScreenResolution()鍙互寰楀埌灞忓箷姣忚嫳瀵哥殑璞$礌鏁?浣嗘槸濂藉儚娌℃湁浠涔堟柟娉曡兘鐭ラ亾鏌愪竴鍙版墦鍗版満鐨勫垎杈ㄧ巼,鏇村埆鎻愬幓鎺у埗鎵撳嵃綺掑害浜嗐備簬鏄彲鑰葷殑浣跨敤鐫涓戦檵鐨勭己鐪佹墦鍗扮簿搴﹀嚑騫村悗錛岀粓浜庢壘鍒頒簡瑙e喅鏂規硶錛屼笉鐭ラ亾璇ラ珮鍏磋繕鏄偛浼わ紝鍏跺師鐞嗚鍑烘潵涔熸槸闈炲父鐨勭畝鍗曪細 鎻愰珮鎵撳嵃綺懼害錛屽叾瀹炲氨鏄妸鏈潵鏄疉3綰哥殑鍐呭寰A4綰擱噷鐢伙紝涔熷氨鏄錛屾墦鍗板尯鍩燂紙榪欓噷瀵瑰簲鐫Java閲岀殑Graphics瀵硅薄錛夐渶瑕佺緝灝忥紝鐒跺悗鐢變簬緙虹渷鎯呭喌涓嬫墦鍗版槸鐓?2DPI鏉ユ墦鐨勶紝涓嶅仛鏀瑰彉鐨勮瘽錛屾墦鍗板唴瀹逛篃浼氳窡鐫鍙樺皬銆傝繖鏍峰氨涓嶆槸鎴戜滑鎯寵鐨勬晥鏋滀簡錛屾墍浠ヨ繕寰楁妸鎵撳嵃鍐呭鎴愭瘮渚嬫斁澶с備竴涓緝灝忥紝涓涓斁澶э紝浜庢槸鐢誨畬鍚庯紝鍦ㄦ寚瀹氬ぇ灝忕殑綰稿紶鍐咃紝渚垮綰充簡姣斾互寰鏇村璞$礌鐨勫唴瀹癸紝榪欎笅涓栫晫鎬葷畻瀹岀編浜嗐?/P>
浠ヤ笂鍋氭硶褰㈣薄鐨勮搴旇鏄繖鏍鳳細鎶婇渶瑕佷駭鐢熺殑鍥懼艦瀵硅薄鍏堟斁澶э紝鐢誨湪涓寮犫滅焊涓娾濓紝鐒跺悗鏁翠綋緙╁皬 錛岃繖鏍風簿搴﹀氨鎻愰珮浜嗐?/P>
tips 1錛氬湪涓鑸紒涓氭姤琛ㄨ〃鏍兼墦鍗頒腑錛屼嬌鐢?44DPI寰楀埌鐨勮〃鏍肩嚎鐨勫搴︾湅璧鋒潵鏈鑸掓湇銆?BR> tips 2錛氱幇鍦ㄥ彿縐?00DPI鐨勬墦鍗版満鍏跺疄鏄?76DPI錛屽鏋滄兂浣跨敤榪欎釜鍒嗚鯨鐜囩殑綺懼害錛岄渶瑕佺敤濂戒竴鐐圭殑綰稿紶錛屽洜涓哄凡緇忓埌鏋侀檺浜嗭紝綰稿紶紼嶅樊鐐癸紝鎵撳嵃澧ㄧ矇灝辨簿涓嶄笂錛屽鑷寸嚎浣撴畫緙恒?/P>
闄勬簮鐮侊紙淇敼鍒嗚鯨鐜囧氨鏀瑰姩鍙橀噺iResMul灝卞ソ錛夛細
import java.awt. * ; import java.awt.print. * ; public class MyPrintableObject implements Printable { public int iResMul = 1 ; // 1 = 72 dpi; 4 = 288 dpi public int print(Graphics g, PageFormat pf, int iPage) throws PrinterException { final int FONTSIZE = 12 ; final double PNT_MM = 25.4 / 72 .; if ( 0 != iPage) return NO_SUCH_PAGE; try { int iPosX = 1 ; int iPosY = 1 ; int iAddY = FONTSIZE * 3 / 2 * iResMul; int iWdth = ( int ) Math.round(pf.getImageableWidth() * iResMul) - 3 ; int iHght = ( int ) Math.round(pf.getImageableHeight() * iResMul) - 3 ; int iCrcl = Math.min(iWdth, iHght) - 4 * iResMul; Graphics2D g2 = (Graphics2D) g; PrinterJob prjob = ((PrinterGraphics) g2).getPrinterJob(); g2.translate(pf.getImageableX(), pf.getImageableY()); g2.scale( 1.0 / iResMul, 1.0 / iResMul); g2.setFont( new Font( " SansSerif " , Font.PLAIN, FONTSIZE * iResMul)); g2.setColor(Color.black); g2.drawRect(iPosX, iPosY, iWdth, iHght); g2.drawLine(iPosX, iHght / 2 + iWdth / 50 , iPosX + iWdth, iHght / 2 - iWdth / 50 ); g2.drawLine(iPosX, iHght / 2 - iWdth / 50 , iPosX + iWdth, iHght / 2 + iWdth / 50 ); g2.drawOval(iPosX + 2 * iResMul, iHght - iCrcl - 2 * iResMul, iCrcl, iCrcl); iPosX += iAddY; iPosY += iAddY / 2 ; g2.drawString( " PrinterJob-UserName: " + prjob.getUserName(), iPosX, iPosY += iAddY); g2.drawString( " Betriebssystem: " + System.getProperty( " os.name " ) + " " + System.getProperty( " os.version " ), iPosX, iPosY += iAddY); g2 .drawString( " Java-Version: JDK " + System.getProperty( " java.version " ), iPosX, iPosY += iAddY); g2.drawString( " Width/Height: " + dbldgt(pf.getWidth()) + " / " + dbldgt(pf.getHeight()) + " points = " + dbldgt(pf.getWidth() * PNT_MM) + " / " + dbldgt(pf.getHeight() * PNT_MM) + " mm " , iPosX, iPosY += iAddY); g2.drawString( " Imageable Width/Height: " + dbldgt(pf.getImageableWidth()) + " / " + dbldgt(pf.getImageableHeight()) + " points = " + dbldgt(pf.getImageableWidth() * PNT_MM) + " / " + dbldgt(pf.getImageableHeight() * PNT_MM) + " mm " , iPosX, iPosY += iAddY); g2.drawString( " Imageable X/Y: " + dbldgt(pf.getImageableX()) + " / " + dbldgt(pf.getImageableY()) + " points = " + dbldgt(pf.getImageableX() * PNT_MM) + " / " + dbldgt(pf.getImageableY() * PNT_MM) + " mm " , iPosX, iPosY += iAddY); g2.drawString( " versuchte Druckaufl sung: " + 72 * iResMul + " dpi " , iPosX, iPosY += iAddY); } catch (Exception ex) { throw new PrinterException(ex.getMessage()); } return PAGE_EXISTS; } private static double dbldgt( double d) { return Math.round(d * 10 .) / 10 .; // show one digit after point } public static void main(String[] args) { PrinterJob pj = PrinterJob.getPrinterJob(); pj.setPrintable( new MyPrintableObject()); if (pj.printDialog()) { try { pj.print(); } catch (PrinterException e) { System.out.println(e); } } } }
錛?STRONG>鍏ㄦ枃瀹?/FONT>錛?nbsp;
]]> 鍩轟簬鎷︽埅鍣ㄧ殑浼佷笟搴旂敤鏋勯?/title> http://www.tkk7.com/wolfsquare/archive/2005/12/06/22772.htmlwolfsquare wolfsquare Tue, 06 Dec 2005 12:49:00 GMT http://www.tkk7.com/wolfsquare/archive/2005/12/06/22772.html http://www.tkk7.com/wolfsquare/comments/22772.html http://www.tkk7.com/wolfsquare/archive/2005/12/06/22772.html#Feedback 4 http://www.tkk7.com/wolfsquare/comments/commentRss/22772.html http://www.tkk7.com/wolfsquare/services/trackbacks/22772.html 鍦?A HREF="/wolfsquare/archive/2005/12/05/22630.html">涓婁竴綃囨枃绔?/A>閲岋紝鎴戜滑浣跨敤浜嗗熀浜庝簨浠朵紶閫掔殑鏈哄埗鏉ュ浼佷笟搴旂敤鐨勫瓙緋葷粺榪涜瑙h︼紝浣嗘槸鐢變簬闇瑕佸己鍒跺湴緇ф壙鎴栬呭疄鐜頒竴涓箍鎾簨浠剁殑鎺ュ彛EventBrocast錛屽疄闄呬笂錛屽氨鑱岃矗鍒嗙鍜屽姛鑳藉崟涓鐨勮搴︽潵鐪嬶紝鍓嶇瘒鏂囩珷涓殑渚嬪瓙涓紝榪欎釜鏈哄埗瀵筄rderService渚靛叆澶ぇ浜嗭紝鎴戜滑蹇呴』瀵繪壘鏇翠負鏈夋晥鐨勬柟娉曪紝涓嶉渶瑕佺▼搴忓疄鐜版煇涓帴鍙f垨緇ф壙鏌愪釜瓚呯被鏉ュ畬鎴愯繖涓伐浣滐紝榪欎竴鍒囧繀欏誨鍏蜂綋紼嬪簭瀹屽叏閫忔槑錛岃繖涓矗浠昏皝鑳芥壙鎷呭憿錛屾鏃犵枒闂紝鍘嗗彶鐨勯噸鎷呭氨钀藉湪浜咥OP韜笂 錛涳級 銆備笅闈㈡垜浠潵鐪嬬湅鍏蜂綋鐨勫疄鐜幫細 OrderService宸茬粡瀹炵幇錛岄櫎浜嗚鍗曠殑澶勭悊錛屾病鏈変換浣曠殑鑱岃矗錛屼負浜嗗畬鎴愪簨浠剁殑騫挎挱錛屽繀欏昏鏈変竴涓斿緞鑳藉鎷︽埅鍒癘rderService鐨勬墍鏈夋柟娉曡皟鐢紝鐒跺悗鍒嗘瀽璋冪敤鐨勮涔夛紙鍙傛暟錛夛紝騫舵牴鎹繖浜涘唴瀹圭粰騫挎挱鍑哄幓銆傝屾伆濂斤紝AOP緇勭粐緇熶竴鐨勬帴鍙ethodInterceptor鍙互瀹屾垚榪欎釜鍔熻兘銆備簬鏄笂綃囨枃绔犵殑紼嬪簭鍙互榪欐牱淇敼錛?/P>
// 璁㈠崟鏈嶅姟鍙礋璐e仛濂借嚜宸辯殑浜?BR>
public class OrderService { public Order saveOrder(Order order){ 銆傘傘傘傚鐞嗚鍗?BR> 銆傘傘備繚瀛?BR> } }
鑰屼負浜嗘嫤鎴換浣曠殑鏂規硶璋冪敤錛屽垯瀹炵幇浜嗘嫤鎴櫒EventBrocaster錛?BR>
public class EventBrocaster extends LifeEventBrocast implements MethodInterceptor { private List eventListeners; public void setEventListener(List list){ this .eventListeners = list; } public List geteEventListeners(){ return eventListeners; } public Object invoke(MethodInvocation invoke) { obj = invoke.proceed(); // 鎵ц琚嫤鎴殑鏂規硶瀹屾垚涓氬姟鎿嶄綔 Object[] params = invoke.getArguments(); Object param = params.length > 1 ? params : params[ 0 ]; Event le = new Event(param, eventType); brocast(le); // 騫挎挱 } }
浜嬩歡渚﹀惉鍣細
public OrderEventListener implements EventListener{ private FinancialService financialService; public void setFinancialService(FinancialService fs){ this .financialService = fs; } public void performed(Event e){ Order order = (Order) e.getObject(); financialService.createRequestOfMoney(order.getAmount() ); } }
鐒跺悗錛屽湪Spring閰嶇疆閲屽皢榪欎簺緇勪歡鍏ㄩ儴榪炴帴璧鋒潵錛?/P>
1.OrderService瀹炵幇: <bean id="orderServiceImpl" class="OrderService" autowire="byName"> </bean>
2. 澹版槑OrderService浠g悊:
<bean id="orderService" class="org.springframework.aop.framework.ProxyFactoryBean"> <property name="target"> <ref local="orderServiceImpl"/> </property> <property name="interceptorNames"> <!--鎷︽埅鍣ㄥ垪琛?-> <list> <value>eventBrocaster</value> </list> </property> <property name="singleton"> <value>true</value> </property> </bean> 3.浜嬩歡騫挎挱鎷︽埅鍣?BR> <bean id="eventBrocaster" class="com.wolfsquare.core.service.EventBrocaster" singleton="true"> <property name="lifecycleListeners"> <list> <ref bean="orderEventListener"/> </list> </property> </bean> 4.鍏蜂綋鐨勮儲鍔″瓙緋葷粺鐨勪睛鍚櫒瀹炵幇涓庤儲鍔$郴緇熺殑閫氳錛?BR> <bean id="orderEventListener" class="OrderEventListener" autowire="byName"> <propety name="financialService"><ref bean="financialService"/></property> </bean>
榪欐牱錛屾垜浠笌鍏蜂綋瀹炵幇鏃犲叧鐨勪簨浠跺箍鎾氨鍋氬埌浜嗭紝鑱槑鐨勬湅鍙嬬湅鍒拌繖閲岋紝鑲畾鎯沖埌浜嗘嫤鎴櫒鏂瑰紡涓嶄粎浠呴傜敤涓庝簨浠跺箍鎾紝榪樺彲浠ュ疄鐜頒簨鍔$殑緇熶竴綆$悊錛屼簨瀹炰笂Spring鐨勪簨鍔$鐞嗗氨鏄繖鏍峰畬鎴愮殑錛岃繕鍙互瀹炵幇鏉冮檺鐨勬帶鍒朵緥濡侫cegi錛岀畝鐩存湁鐐硅薄涓囪兘鐨勮兌姘達紝鍛靛懙銆?/P>
浠庝袱綃囨枃绔犵殑閫愭鎺㈣涓嬶紝鍚屼竴涓満鍣紝鍚屼竴涓櫄鎷熸満涔嬪唴鐨勬暟鎹氳閮藉彲浠ュ疄鐜頒簡錛岄偅涔堝紓鏋勭郴緇熷拰澶氳櫄鎷熸満闂寸殑閫氳鍙堝浣曞鐞嗗憿錛屼簬鏄疎SB錛堜紒涓氭湇鍔℃葷嚎錛夌殑姒傚康灝辨參鎱㈡誕鐜板嚭鏉ヤ簡錛屼笉榪囪繖涓笉鍦ㄦ湰鏂囨帰璁ㄧ殑鑼冪暣浜嗭紝涔熻鍦ㄤ笉涔呯殑灝嗘潵錛屾垜浼氳ˉ涓婅繖涓綃囥?/P>
錛堝叏鏂囧畬錛?/STRONG>
]]> 鍩轟簬浜嬩歡鍒嗗彂鏈哄埗鐨勪紒涓氬簲鐢ㄥ紑鍙? http://www.tkk7.com/wolfsquare/archive/2005/12/05/22630.htmlwolfsquare wolfsquare Mon, 05 Dec 2005 12:31:00 GMT http://www.tkk7.com/wolfsquare/archive/2005/12/05/22630.html http://www.tkk7.com/wolfsquare/comments/22630.html http://www.tkk7.com/wolfsquare/archive/2005/12/05/22630.html#Feedback 3 http://www.tkk7.com/wolfsquare/comments/commentRss/22630.html http://www.tkk7.com/wolfsquare/services/trackbacks/22630.html 鍋氳繃DOS緙栫▼鐨勪漢閮界煡閬擄紝Dos緙栫▼鍜學indow緙栫▼鏈澶т笉鍚屼箣涓灝辨槸浜嬩歡鏈哄埗鐨勭紪紼嬶紝鏅亶鐨勶紝鐩墠浜嬩歡鏈哄埗鐨勪嬌鐢ㄥ凡緇忓湪Windows涓嬬殑搴旂敤紼嬪簭涓亶鍦板紑鑺變簡錛屽彲鏄熀浜庝簨浠朵紶鎾殑搴旂敤浠呬粎闄愪簬window搴旂敤紼嬪簭鍚楋紵絳旀鏄細涓嶃?BR> 鍦↖OC姒傚康鐨勪笉鏂啿鍑諱笅錛屾垜浠渶瑕佸洖澶村幓瀹¤鍓嶄袱騫磋嚜宸卞紑鍙戠殑錛屽績涓負涔嬮獎鍌茬殑錛岃涓洪潪甯鎬紭縐鐨勭▼搴忥紝鍦ㄨ繖榪囩▼涓紝鎴戜滑灝變細鐪嬪埌榪欎簺楠勫偛鍦ㄦ渶鏂扮殑姒傚康鍐插嚮涓嬬儫娑堜簯鏁d簡銆傚彉鎴愪簡涓戦檵鐨勶紝绱ц﹀悎鐨勫弽闈㈣寖渚嬨傝鎴戜滑鏉ョ湅鐪嬩互涓嬪満鏅細
鏌愬叕鍙告湁鍩轟簬鏌愬鉤鍙扮殑涓ゅ瓙緋葷粺錛岃璐郴緇烝鍜岃儲鍔$郴緇烞銆傚綋閲囪喘鍛樺湪棰勯噰璐煇鐗╁搧鍓嶏紝鍏堝湪瀹氳喘緋葷粺A涓櫥璁伴渶瑕佽喘涔扮殑璐х墿鍜屼環鏍鹼紝鐒跺悗璐㈠姟緋葷粺B灝卞紑濮嬭絎旇喘鐗╂欏圭殑鐢寵嫻佺▼銆?BR> 棣栧厛璁╂垜浠潵鐪嬬湅涓ゅ勾鍓嶇殑浠g爜鏄庝箞瀹炵幇鐨勶細
public class OrderService { private FinancialService financialService = new FinancialServiceImpl(); public Order saveOrder(Order order) { 銆傘傘傘傚鐞嗚鍗?BR> financialService.createRequestOfMoney(order.getAmount()); } }
浠庝笂闈㈢殑浠g爜涓彲浠ュ緢鏄庢樉鐪嬪埌錛屽畾璐郴緇烝鍜岃儲鍔″瓙緋葷粺鍙戠敓浜嗚﹀悎錛屼篃璁告湁鍚屽織璇達紝閭f垜閲囩敤Spring絳塈OC妗嗘灦鏉ヨВ鑰︼細
public class OrderService { private FinancialService financialService; public void setFinancialService(FinancialService fs) { this .financialService = fs; } public Order saveOrder(Order order) { 銆傘傘傘傚鐞嗚鍗?BR> financialService.createRequestOfMoney(order.getAmount()); } }
璐㈠姟瀛愮郴緇烞鐨勫疄鐜癋inancialServiceImpl鏄氳繃Spring絳塈OC妗嗘灦璁劇疆榪涘幓鐨勩傝繖鏍蜂笉鏄緢瀹岀編浜嗗悧錛?/P>
浣嗘槸鎴戜粛鐒惰璇達紝榪欎釜鍙槸浜斿崄姝ョ瑧鐧炬緗簡銆傚啀璇風湅浠ヤ笅鍦烘櫙錛氳鍏徃鐨勪笟鍔¤鍒欒搗浜嗗彉鍖栵紝閲戦灝戜簬1涓囧厓鐨勫畾璐笉闇瑕侀氳繃璐㈠姟鐢寵嫻佺▼銆傝繖鏍瘋儲鍔″瓙緋葷粺B鍗囩駭鍒癇2浜嗭紝澶氫簡涓涓洿鎺ユ嫧嬈劇殑API payMoney()銆傝繖鏃跺欙紝瀹氳喘緋葷粺璇ユ庝箞鍔烇紵闄や簡淇敼浠g爜娌℃湁鍒殑鍔炴硶銆傝繖涓椂鍊欙紝鍩轟簬浜嬩歡鍒嗗彂澶勭悊鐨勬満鍒跺氨澶ф淳鐢ㄥ満浜嗐?BR> 淇敼鍘熸潵鐨勮鍗曠郴緇熷疄鐜頒笅鍗曟秷鎭殑騫挎挱銆?BR>
public class OrderService extend EventBrocast { private FinancialService financialService = new FinancialServiceImpl(); public Order saveOrder(Order order) { 銆傘傘傘傚鐞嗚鍗?BR> brocastEvent( new Event(order)); // *** } }
瀹炵幇涓涓秷鎭洃鍚櫒錛?BR>
public OrderEventListener implements EventListener { public void performed(Event e) { Order order = (Order) e.getObject(); financialService.createRequestOfMoney(order.getAmount() ); } }
鍦ㄩ厤緗腑璁劇疆錛堣繖閲屾垜浠嬌鐢ㄧ殑鏄疭pring錛?BR> <bean id="orderService" ...> <property name="eventListener"> <list> <ref local="orderListener"/> </list> </property> </bean> <bean id="orderListener" ...>
榪欐牱鎴戜滑灝卞疄鐜頒簡璁㈠崟緋葷粺鍜岃儲鍔$郴緇熺殑瑙h?濡傛灉璐㈠姟緋葷粺鍙戠敓鐨勪慨鏀癸紝鎴戜滑灝卞彧闇瀹炵幇鏂扮殑鐩戝惉鍣ㄥ氨鍙互浜嗭細
public NewOrderEventListener implements EventListener { private FinancialService financialService; public void setFinancialService(FinancialService fs) { this .financialService = fs; } public void performed(Event e) { Order order = (Order) e.getObject(); financialService.payMoney(order.getAmount() ); } }
涓嬩竴綃囨枃绔?鎴戝皢寮曞叆AOP鐨勬蹇墊潵灝嗙郴緇熸彁楂樺埌鏇撮珮鐨勬娊璞″眰嬈°?BR> 錛堝叏鏂囧畬錛?/FONT>
]]>
主站蜘蛛池模板:
亚洲?v无码国产在丝袜线观看
|
成人免费视频试看120秒 |
国产V亚洲V天堂无码 |
国产精品福利片免费看 |
国产亚洲精品成人a v小说 |
一个人免费观看日本www视频 |
亚洲欧洲国产成人综合在线观看 |
一级毛片完整版免费播放一区 |
亚洲伊人久久综合影院 |
人妻仑乱A级毛片免费看 |
在线精品亚洲一区二区三区 |
四虎影视久久久免费 |
中文字幕亚洲激情 |
国产精品免费AV片在线观看 |
在线免费观看亚洲 |
国产福利在线观看免费第一福利 |
亚洲欧洲国产精品久久 |
大学生一级特黄的免费大片视频 |
国产精品亚洲一区二区在线观看 |
亚洲国产一区二区视频网站 |
国产午夜精品理论片免费观看
|
在线观看无码的免费网站 |
亚洲AV综合永久无码精品天堂 |
国产男女性潮高清免费网站 |
黄页免费视频播放在线播放 |
亚洲色欲一区二区三区在线观看 |
日韩视频免费在线观看 |
ASS亚洲熟妇毛茸茸PICS |
www国产亚洲精品久久久 |
a级大片免费观看 |
亚洲午夜国产精品 |
俄罗斯极品美女毛片免费播放 |
中文在线观看免费网站 |
亚洲精品一区二区三区四区乱码 |
免费观看的毛片手机视频 |
aa在线免费观看 |
男人天堂2018亚洲男人天堂 |
久久精品国产亚洲精品 |
久草视频在线免费 |
亚洲第一视频在线观看免费 |
亚洲天堂一区在线 |