锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲欧洲免费无码,91亚洲精品自在在线观看,亚洲精品人成网在线播放影院http://www.tkk7.com/kuuyee/category/49118.htmlwhile (浜у搧+闇姹?璁捐+寮鍙?嫻嬭瘯+閮ㄧ講+鍙戝竷 == doing) { CI }zh-cnFri, 14 Jun 2013 10:48:06 GMTFri, 14 Jun 2013 10:48:06 GMT60褰揈ffectiveJava閬囪Guava - 浣跨被鍜屾垚鍛樼殑鍙闂ф渶灝忓寲(瑙勫垯13)http://www.tkk7.com/kuuyee/archive/2013/06/14/400560.htmlkuuyeekuuyeeFri, 14 Jun 2013 09:09:00 GMThttp://www.tkk7.com/kuuyee/archive/2013/06/14/400560.htmlhttp://www.tkk7.com/kuuyee/comments/400560.htmlhttp://www.tkk7.com/kuuyee/archive/2013/06/14/400560.html#Feedback0http://www.tkk7.com/kuuyee/comments/commentRss/400560.htmlhttp://www.tkk7.com/kuuyee/services/trackbacks/400560.html

杞歡璁捐鐨勫熀鏈師鍒欎箣涓錛屽氨鏄郴緇熻妯″潡鍖栵紝妯″潡涔嬮棿鍙氳繃浠栦滑鐨凙PI榪涜閫氫俊錛屼竴涓ā鍧椾笉闇瑕佺煡閬撳叾浠栨ā鍧楃殑鍐呴儴宸ヤ綔鎯呭喌錛岃繖涓蹇電О浣滀俊鎭殣钘?information hiding)鎴栧皝瑁?encapsulation)銆?/span>

闇瑕侀伒瀹堢殑鍘熷垯
  • 灝藉彲鑳藉湴浣挎瘡涓被鎴栨垚鍛樹笉琚鐣岃闂?/strong>鎹㈠彞璇濊錛屽簲璇ヤ嬌鐢ㄤ笌浣犳鍦ㄧ紪鍐欑殑杞歡鐨勫搴斿姛鑳界浉涓鑷淬佸敖鍙兘鏈灝忕殑璁塊棶綰у埆銆?/p>

  • 瀵逛簬欏跺眰鐨?闈炲祵濂楃殑)綾誨拰鎺ュ彛錛屽彧鏈変袱縐嶅彲鑳介潪璁塊棶綰у埆錛岃浠庢槸鍖呯駭縐佹湁鐨勪篃灝辨槸default錛岃涔堟槸public鐨?鍖呯駭縐佹湁灝辨剰鍛崇潃瀹冩槸榪欎釜鍖?strong>瀹炵幇鐨勪竴閮ㄥ垎錛屼笉浼氫綔涓鴻鍖匒PI琚鍑猴紝榪欐牱鍦ㄤ互鍚庣殑鍙戝瀷鐗堟湰涓紝瀵瑰畠淇敼銆佹浛鎹€佸垹闄ゅ氨涓嶇敤鎷呭績浼氬獎鍝嶅厛鏈夊鎴風鐨勭▼搴忋?/p>

  • 濡傛灉涓涓寘綰х鏈夌殑欏跺眰綾?鎴栬呮帴鍙?鍙槸鍦ㄦ煇涓涓被鍐呴儴琚敤鍒幫紝灝卞簲璇ヨ冭檻鎶婂畠鍙樻垚鍞竴浣跨敤瀹冪殑閭d釜綾葷殑縐佹湁宓屽綾匯?/p>

  • 闄嶄綆涓嶅繀瑕佸叕鏈夌被鐨勫彲璁塊棶鎬э紝姣旈檷浣庡寘綰х鏈夌殑欏跺眰綾繪洿閲嶈鐨勫錛屽洜涓哄叡鏈夌被鏄疉PI鐨勪竴閮ㄥ垎錛岃屽寘綰х鏈夌殑欏跺眰綾誨凡緇忔槸鍖呭疄鐜扮殑涓閮ㄥ垎浜嗐?/p>

  • 鍙椾繚鎶?protected)鐨勭被鎴栨垚鍛樻槸瀵煎嚭API鐨勪竴閮ㄥ垎錛屽繀欏繪案榪滃緱鍒版敮鎸侊紝搴旇閬垮厤灝介噺灝戠敤銆?/p>

  • 濡傛灉瀛愮被瑕嗙洊浜嗚秴綾葷殑涓涓柟娉曪紝瀛愮被涓殑璁塊棶綰у埆灝變笉鍏佽浣庝簬瓚呯被涓殑璁塊棶綰у埆錛屽惁鍒欎細緙栬瘧閿欒銆傚疄鐜頒簡鎺ュ彛鐨勬墍鏈夋柟娉曚篃蹇呴』鏄叡鏈夌殑錛屽洜涓烘帴鍙d腑鐨勬墍鏈夋柟娉曢兘鏄殣鍚潃鍏辨湁璁塊棶綰у埆銆?/p>

  • 涓轟簡渚夸簬嫻嬭瘯錛屼笉搴旇鎶婂叾璁塊棶綰у埆鎴愪負鍏辨湁鐨勶紝鍙栬屼唬涔嬫槸鎶婃祴璇曠被鎴愪負鍖呯殑涓閮ㄥ垎錛屼粠鑰岃兘澶熻闂畠鐨勫寘綰х鏈夊厓绱犮?/p>

  • 瀹炰緥鍩熷喅涓嶈兘鏄叡鏈夌殑錛屽寘鍚叕鏈夊彲鍙樺煙鐨勭被鍗充究鏄痜inal鐨勪篃涓嶆槸綰跨▼瀹夊叏鐨?/strong>錛?/p>

Note
闀垮害闈為浂鐨勬暟緇勬繪暟鍙彉鐨勶紝鎵浠ワ紝綾誨叿鏈夊叕鏈夌殑闈欐乫inal鏁扮粍鍩燂紝鎴栬呰繑鍥炶繖縐嶅煙鐨勮闂柟娉曪紝榪欏嚑涔庢繪暟閿欒鐨勩?br />

public class UnmodifiableArray {
// 娼滃湪瀹夊叏婕忔礊
public static final String[] VALUES = { "RED", "GREEN" };

public static void main(String[] args) {
UnmodifiableArray UF = new UnmodifiableArray();
UF.VALUES[1] = "YELLO";//璁劇疆final鏁扮粍鎴愬憳
System.out.println(UF);
}
//浣跨敤Guava
@Override
public String toString() {
return Objects.toStringHelper(this).add("VALUES0", UnmodifiableArray.VALUES[0])
.add("VALUES1", UnmodifiableArray.VALUES[1]).toString();
}
}

涓婇潰鐨勪緥瀛愰噷錛屾垜浠垚鍔熸洿鏀逛簡涓涓笉鍙彉鏁扮粍錛屾妸鎴愬憳GREEN淇敼涓?tt>YELLO錛屾墽琛岃緭鍑哄涓嬶細

UnmodifiableArray{VALUES0=RED, VALUES1=YELLO}

鎴戜滑鍙互閫氳繃澧炲姞涓涓笉鍙彉闆嗗悎鍒楄〃鏉ヨВ鍐寵繖涓畨鍏ㄩ棶棰橈紝騫舵妸鍘熸潵public璁塊棶綰у埆鏀逛負private鐨勶細

public class UnmodifiableArrayList {
// 娑堥櫎瀹夊叏婕忔礊
private static final String[] PRIVATE_VALUES = { "RED", "GREEN" };
public static final List<String> PVALUES = Collections.unmodifiableList(Arrays.asList(PRIVATE_VALUES));
public static void main(String[] args) {
UnmodifiableArrayList UF = new UnmodifiableArrayList();
UF.PVALUES.add(1, "YELLO"); //浼氭姏鍑篣nsupportedOperationException寮傚父
System.out.println(UF);
}
//浣跨敤Guava
@Override
public String toString() {
return Objects.toStringHelper(this)
.add("PVALUES0", UnmodifiableArrayList.PVALUES.get(0))
.add("PVALUES1", UnmodifiableArrayList.PVALUES.get(1))
.toString();
}
}

鏋勫緩涓涓笉鍙彉闆嗗悎錛孏uava緇欏嚭浜嗘洿綆媧佺殑鍔炴硶錛?/p>

ImmutableList mmutableList = ImmutableList.of(PRIVATE_VALUES);

2013-06-14


kuuyee 2013-06-14 17:09 鍙戣〃璇勮
]]>
Java鍥涘ぇ鍚嶈憲涓嬭澆澶у叏錛堜腑鏂?鑻辨枃錛?/title><link>http://www.tkk7.com/kuuyee/archive/2013/06/03/400084.html</link><dc:creator>kuuyee</dc:creator><author>kuuyee</author><pubDate>Mon, 03 Jun 2013 00:30:00 GMT</pubDate><guid>http://www.tkk7.com/kuuyee/archive/2013/06/03/400084.html</guid><wfw:comment>http://www.tkk7.com/kuuyee/comments/400084.html</wfw:comment><comments>http://www.tkk7.com/kuuyee/archive/2013/06/03/400084.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.tkk7.com/kuuyee/comments/commentRss/400084.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/kuuyee/services/trackbacks/400084.html</trackback:ping><description><![CDATA[<div style="float: left; min-height: 1px; margin-left: 30px; width: 870px; color: #4e443c; font-family: adelle, Georgia, 'Times New Roman', serif; line-height: 20px; background-color: #f0efe7;"><br /><div style="background-color: #fcfcfa; border: 1px solid #e2e0d8; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; padding: 22px; margin-bottom: 35px;"><h2><span style="font-size: 14px;">鎶芥椂闂存暣鐞嗕簡涓涓婮ava鍥涘ぇ鍚嶈憲錛屽垎浜嚭鏉ユ柟渚垮ぇ瀹跺涔狅紒</span></h2><div style="padding-left: 15px; margin: 0px 0px 20px; border-left-width: 5px; border-left-style: solid; border-left-color: #eeeeee;"><table style="max-width: 100%; background-color: transparent; border-collapse: collapse; border-spacing: 0px;"><tbody><tr><td><div>Note</div></td><td><strong>閮戦噸澹版槑錛佹湰浜哄己鐑堟敮鎸佹鐗堬紝鍥涘ぇ鍚嶈憲鎴戝凡緇忎拱浜嗕笁鏈紝涓嬭澆鐢靛瓙鐗堝彧鏄柟渚塊槄璇伙紒姣曠珶榪欎箞緇忓吀鐨勪功鏄繀鏀惰棌鐨勶紒</strong></td></tr></tbody></table></div><div><ul style="padding: 0px; margin: 0px 0px 10px 25px;"><li><p style="margin: 0px 0px 10px;"><a style="color: #0088cc; text-decoration: none;">Java緙栫▼鎬濇兂(絎?鐗?</a></p><div><ul style="padding: 0px; margin: 0px 0px 0px 25px;"><li><p style="margin: 0px 0px 10px;">涓枃楂樻竻鐗堬細 <a style="color: #0088cc; text-decoration: none;">http://pan.baidu.com/share/link?shareid=502949&uk=2785758310</a></p></li><li><p style="margin: 0px 0px 10px;">鑻辨枃鍘熺増PDF錛?nbsp;<a style="color: #0088cc; text-decoration: none;">http://pan.baidu.com/share/link?shareid=503042&uk=2785758310</a></p></li><li><p style="margin: 0px 0px 10px;">闅忎功婧愮爜錛?nbsp;<a style="color: #0088cc; text-decoration: none;">http://pan.baidu.com/share/link?shareid=503044&uk=2785758310</a></p></li></ul></div></li><li><p style="margin: 0px 0px 10px;"><a style="color: #0088cc; text-decoration: none;">Effective Java錛堢2鐗堬級</a></p><div><ul style="padding: 0px; margin: 0px 0px 0px 25px;"><li><p style="margin: 0px 0px 10px;">涓枃楂樻竻鐗堬細 <a style="color: #0088cc; text-decoration: none;">http://pan.baidu.com/share/link?shareid=503046&uk=2785758310</a></p></li><li><p style="margin: 0px 0px 10px;">鑻辨枃鍘熺増PDF錛?nbsp;<a style="color: #0088cc; text-decoration: none;">http://pan.baidu.com/share/link?shareid=503049&uk=2785758310</a></p></li><li><p style="margin: 0px 0px 10px;">闅忎功婧愮爜錛?nbsp;<a style="color: #0088cc; text-decoration: none;">http://pan.baidu.com/share/link?shareid=503051&uk=2785758310</a></p></li></ul></div></li><li><p style="margin: 0px 0px 10px;"><a style="color: #0088cc; text-decoration: none;">Java鏍稿績鎶鏈?鍗稩錛堢8鐗堬級</a></p><div><ul style="padding: 0px; margin: 0px 0px 0px 25px;"><li><p style="margin: 0px 0px 10px;">涓枃楂樻竻鐗堬細 <a style="color: #0088cc; text-decoration: none;">http://pan.baidu.com/share/link?shareid=503052&uk=2785758310</a></p></li><li><p style="margin: 0px 0px 10px;">鑻辨枃鍘熺増PDF錛?nbsp;<a style="color: #0088cc; text-decoration: none;">http://pan.baidu.com/share/link?shareid=503055&uk=2785758310</a></p></li><li><p style="margin: 0px 0px 10px;">闅忎功婧愮爜錛?nbsp;<a style="color: #0088cc; text-decoration: none;">http://pan.baidu.com/share/link?shareid=503056&uk=2785758310</a></p></li></ul></div></li><li><p style="margin: 0px 0px 10px;"><a style="color: #0088cc; text-decoration: none;">Java鏍稿績鎶鏈?鍗稩I錛堢8鐗堬級</a></p><div><ul style="padding: 0px; margin: 0px 0px 0px 25px;"><li><p style="margin: 0px 0px 10px;">涓枃楂樻竻鐗堬細 <a style="color: #0088cc; text-decoration: none;">http://pan.baidu.com/share/link?shareid=503057&uk=2785758310</a></p></li><li><p style="margin: 0px 0px 10px;">鑻辨枃鍘熺増CHM錛?nbsp;<a style="color: #0088cc; text-decoration: none;">http://pan.baidu.com/share/link?shareid=503058&uk=2785758310</a></p></li><li><p style="margin: 0px 0px 10px;">闅忎功婧愮爜錛?nbsp;<a style="color: #0088cc; text-decoration: none;">http://pan.baidu.com/share/link?shareid=503056&uk=2785758310</a></p></li></ul></div></li><li><p style="margin: 0px 0px 10px;"><a style="color: #0088cc; text-decoration: none;">Java璇█紼嬪簭璁捐(絎?鐗?</a></p><div><ul style="padding: 0px; margin: 0px 0px 0px 25px;"><li><p style="margin: 0px 0px 10px;">涓枃楂樻竻鐗堬細 <a style="color: #0088cc; text-decoration: none;">http://pan.baidu.com/share/link?shareid=503059&uk=2785758310</a></p></li><li><p style="margin: 0px 0px 10px;">鑻辨枃鍘熺増CHM錛?nbsp;<a style="color: #0088cc; text-decoration: none;">http://pan.baidu.com/share/link?shareid=503060&uk=2785758310</a></p></li></ul></div></li><li><p style="margin: 0px 0px 10px;"><a style="color: #0088cc; text-decoration: none;">Java緙栫▼鎬濇兂(絎?鐗?</a></p><div><ul style="padding: 0px; margin: 0px 0px 0px 25px;"><li><p style="margin: 0px 0px 10px;">涓枃楂樻竻闈炴壂鎻忕増錛?nbsp;<a style="color: #0088cc; text-decoration: none;">http://pan.baidu.com/share/link?shareid=503099&uk=2785758310</a></p></li><li><p style="margin: 0px 0px 10px;">鑻辨枃鍘熺増PDF錛?nbsp;<a style="color: #0088cc; text-decoration: none;">http://pan.baidu.com/share/link?shareid=503102&uk=2785758310</a></p></li><li><p style="margin: 0px 0px 10px;">闅忎功婧愮爜錛?nbsp;<a style="color: #0088cc; text-decoration: none;">http://pan.baidu.com/share/link?shareid=503103&uk=2785758310</a></p></li><li><p style="margin: 0px 0px 10px;">涔犻絳旀錛?nbsp;<a style="color: #0088cc; text-decoration: none;">http://pan.baidu.com/share/link?shareid=503105&uk=2785758310</a></p></li></ul></div></li></ul></div><p style="margin: 0px 0px 10px;"></p><div>2013-05-30</div></div></div><img src ="http://www.tkk7.com/kuuyee/aggbug/400084.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/kuuyee/" target="_blank">kuuyee</a> 2013-06-03 08:30 <a href="http://www.tkk7.com/kuuyee/archive/2013/06/03/400084.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>褰揈ffectiveJava閬囪Guava - 闈欐佸伐鍘傛柟娉曚唬鏇挎瀯閫犲櫒(瑙勫垯1)http://www.tkk7.com/kuuyee/archive/2013/05/30/399987.htmlkuuyeekuuyeeThu, 30 May 2013 09:09:00 GMThttp://www.tkk7.com/kuuyee/archive/2013/05/30/399987.htmlhttp://www.tkk7.com/kuuyee/comments/399987.htmlhttp://www.tkk7.com/kuuyee/archive/2013/05/30/399987.html#Feedback1http://www.tkk7.com/kuuyee/comments/commentRss/399987.htmlhttp://www.tkk7.com/kuuyee/services/trackbacks/399987.html

Effective Java涓寚鍑猴紝浣跨敤闈欐佸伐鍘傛柟娉曚唬鏇挎瀯閫犲櫒鏈夊嚑澶т紭鍔匡細

絎竴澶т紭鍔?- 浠栦滑鏈夊悕縐般?/h4>

澶氫釜鏋勯犲櫒鍙兘閫氳繃鍖歸厤鍙傛暟綾誨瀷鐨勯『搴忎笉鍚屾潵鍖哄垎浣跨敤鍝竴涓紝榪欐牱甯稿父浼氬鑷寸敤鎴瘋皟鐢ㄩ敊璇瀯閫犲櫒錛岃岄潤鎬佸伐紼嬫柟娉曞垯涓嶅悓錛屽彲浠ラ氳繃鏂規硶鍚嶆竻鏅扮殑鎸囨槑鐢ㄦ剰銆?/p>

//鏈緥鍙敤鏉ヨ鏄庣涓澶т紭鍔匡紝璇蜂笉瑕佺籂緇撳叾瀹冮棶棰?/span> 
public class Foo {
Set<Bar> bars;
List<Car> cars;
//鏋勯犲櫒1
private Foo(Set<Bar> bars) {
this.bars = bars;
}
//鏋勯犲櫒2
private Foo(List<Car> cars) {
this.cars = cars;
}
//鏋勯犲櫒3
private Foo(Set<Bar> bars, List<Car> cars) {
this.bars = bars;
this.cars = cars;
}
//闈欐佸伐鍘傛柟娉?
public static Foo newInstanceByBar(){
return new Foo(new HashSet<Bar>());
}
//闈欐佸伐鍘傛柟娉?
public static Foo newInstanceByCar(){
return new Foo(new ArrayList<Car>());
}
//闈欐佸伐鍘傛柟娉?
public static Foo newInstanceByAll(){
return new Foo(new HashSet<Bar>(),new ArrayList<Car>());
}
public static void main(String[] args) {
// 閫氳繃鏋勯犲櫒鍒涘緩瀹炰緥錛屼笉濂藉尯鍒嗗鏄撲嬌鐢ㄩ敊璇?br /> Foo fbar = new Foo(new HashSet<Bar>());
Foo fcar = new Foo(new ArrayList<Car>());
Foo fall = new Foo(new HashSet<Bar>(),new ArrayList<Car>());
// 閫氳繃闈欐佸伐鍘傛柟娉曞彲浠ユ竻鏅扮殑鐢ㄦ柟娉曞悕璇嗗埆
Foo fbar_static = Foo.newInstanceByBar();
Foo fcar_static = Foo.newInstanceByCar();
Foo fall_static = Foo.newInstanceByAll();
}
}
class Bar {}
class Car {}

瀵逛簬Guava錛屽茍娌℃湁鎻愪緵鍒涘緩闈欐佸伐鍘傛柟娉曠殑宸ュ叿錛屼絾鏁翠釜Guava API鍒板閮芥槸闈欐佹柟娉曠殑瀹炵幇錛屾垜浠互Guava Collections Framewrok涓句緥璇存槑銆?/p>

Guava瀵逛簬絎竴澶т紭鍔挎湁寰堝瀹炵幇錛?/p>

List<Type> exactly100 = Lists.newArrayListWithCapacity(100);
List<Type> approx100 = Lists.newArrayListWithExpectedSize(100);
Set<Type> approx100Set = Sets.newHashSetWithExpectedSize(100);

絎簩澶т紭鍔?- 涓嶅繀鍦ㄦ瘡嬈¤皟鐢ㄤ粬浠殑鏃跺欓兘鍒涘緩涓涓柊瀵硅薄銆?/h4>

鏂逛究瀵硅薄閲嶇敤錛岃繕鍙互紜繚涓嶅彲鍙樼殑涓嶄細瀛樺湪涓や釜鐩哥瓑鐨勫疄渚嬶紝濡傛灉a==b閭d箞a.equals.(b)鎵嶄細榪斿洖true ,濡傛灉鑳戒繚璇佽繖涓鐐癸紝灝卞彲浠ヤ嬌鐢?tt>==鎿嶄綔絎︽潵姣旇緝瀵硅薄錛屼細鏈夊緢澶х殑鎬ц兘鎻愬崌銆?/p>

絎笁澶т紭鍔?- 浠栦滑鍙互榪斿洖鍘熻繑鍥炵被鍨嬬殑浠諱綍瀛愮被鍨嬬殑瀵硅薄銆?/h4>

榪欐槸涓涓潪甯稿己澶х殑鐗規э紝 Effective Java涓垪涓句簡API銆丼PI銆佹湇鍔℃彁渚涙鏋剁殑鍏崇郴鏉ヨ鏄庯細

API(Service Interface): 鏈嶅姟鍏叡鎺ュ彛 SPI(Service Provider Interface)錛?鏈嶅姟鎻愪緵鍟嗘帴鍙?nbsp;SPF(Service Provider Framework): 鏈嶅姟鎻愪緵妗嗘灦

鐪嬩緥瀛?

// 鏈嶅姟鎻愪緵妗嗘灦紺烘剰妯″瀷 - 鏈嶅姟API 
public interface ServiceAPI {
// 榪欓噷鏄湇鍔℃寚瀹氱殑鏂規硶
}
// 鏈嶅姟鎻愪緵妗嗘灦紺烘剰妯″瀷 - 鏈嶅姟SPI
public interface ServiceSPI {
ServiceAPI newService();
}
// 鏈嶅姟鎻愪緵妗嗘灦紺烘剰妯″瀷瀹炵幇
// 涓嶅彲瀹炰緥鍖栫殑綾伙紝鐢ㄦ潵娉ㄥ唽鍒涘緩鍜屾彁渚涜闂?/span>
public class ServiceFramework {
private ServiceFramework() {
}// 寮哄埗闃叉瀹炰緥鍖栵紙瑙勫垯4錛?br />
// 鏄犲皠鏈嶅姟鍚嶅埌鏈嶅姟
private static final ConcurrentMap<String, ServiceSPI> spis = new MapMaker().makeMap();//浣跨敤Guava鍒涘緩
public static final String DEFAULT_SPI_NAME = "<def>";

// 榛樿SPI娉ㄥ唽API
public static void registerDefaultSPI(ServiceSPI spi) {
registerSPI(DEFAULT_SPI_NAME, spi);
}

// 鎸囧畾SPI娉ㄥ唽API
public static void registerSPI(String name, ServiceSPI spi) {
spis.put(name, spi);
}

// 鏈嶅姟璁塊棶API
public static ServiceAPI newInstance() {
return newInstance(DEFAULT_SPI_NAME);
}
public static ServiceAPI newInstance(String name) {
ServiceSPI spi = spis.get(name);
if(spi == null)
throw new IllegalArgumentException(
"No provider registered with name: " + name);
return spi.newService();
}
}
Note
闈欐佸伐紼嬫柟娉曡繑鍥炵殑瀵硅薄鎵灞炵殑綾伙紝鍦ㄧ紪鍐欒繖涓寘鍚潤鎬佸伐鍘傛柟娉曠殑綾繪椂鍙互涓嶅繀瀛樺湪銆備笂闈㈢殑渚嬪瓙鍦ㄧ紪鍐橲erviceFramework綾繪椂錛孲erviceAPI鐨勫疄鐜扮被騫朵笉瀛樺湪銆傝繖澶уぇ澧炲姞浜嗘鏋剁殑鐏墊椿鎬с?/strong>

鐜板湪緙栧啓瀹㈡埛绔祴璇曠▼搴?/p>

// 綆鍗曠殑鏈嶅姟鎻愪緵妗嗘灦嫻嬭瘯紼嬪簭 
public class Test {
public static void main(String[] args) {
// 鏈嶅姟鎻愪緵鍟嗘墽琛屼笅闈㈢殑娉ㄥ唽
ServiceFramework.registerDefaultSPI(DEFAULT_PROVIDER);
ServiceFramework.registerSPI("comp", COMP_PROVIDER);
ServiceFramework.registerSPI("armed", ARMED_PROVIDER);
// 瀹㈡埛绔墽琛屼笅闈㈢殑鍒涘緩
ServiceAPI s1 = ServiceFramework.newInstance();
ServiceAPI s2 = ServiceFramework.newInstance("comp");
ServiceAPI s3 = ServiceFramework.newInstance("armed");
System.out.printf("%s, %s, %s%n", s1, s2, s3);
}
private static ServiceSPI DEFAULT_PROVIDER = new ServiceSPI() {
public ServiceAPI newService() {
return new ServiceAPI() {
@Override
public String toString() {
return "榛樿鏈嶅姟";
}
};
}
};
private static ServiceSPI COMP_PROVIDER = new ServiceSPI() {
public ServiceAPI newService() {
return new ServiceAPI() {
@Override
public String toString() {
return "Complementary 鏈嶅姟";
}
};
}
};
private static ServiceSPI ARMED_PROVIDER = new ServiceSPI() {
public ServiceAPI newService() {
return new ServiceAPI() {
@Override
public String toString() {
return "Armed 鏈嶅姟";
}
};
}
};
}

//杈撳嚭濡備笅 榛?/span>璁?/span>鏈?/span>鍔?/span>, Complementary 鏈?/span>鍔?/span>, Armed 鏈?/span>鍔?/span>

絎洓澶т紭鍔?- 鍦ㄥ垱寤哄弬鏁板寲綾誨瀷瀹炰緥鐨勬椂鍊欙紝浠栦滑浣夸唬鐮佸彉寰楁洿鍔犵畝媧併?/h4>

鍦↗DK7涔嬪墠錛屾垜浠垱寤轟竴涓狢ollections澶ц嚧鏄繖涔堝仛鐨勶細

List<TypeThatsTooLongForItsOwnGood> list = new ArrayList<TypeThatsTooLongForItsOwnGood>();

JDK7鍙戝竷浠ュ悗錛屾垜浠彲浠ョ畝鍖栨垚榪欐牱錛?/p>

List<TypeThatsTooLongForItsOwnGood> list = new ArrayList<>();

浣嗘槸Guava榪樻槸瀹佹効浣跨敤闈欐佸伐紼嬫柟娉曪紝鍥犱負鐪熺殑闈炲父鏂逛究錛?/p>

Set<Type> copySet = Sets.newHashSet(elements); 
List<String> theseElements = Lists.newArrayList("alpha", "beta", "gamma");

闈欐佸伐紼嬫柟娉曠殑緙虹偣

  • 綾誨鏋滀笉鍚叕鏈夌殑鎴栬呭彈淇濇姢鐨勬瀯閫犲櫒錛屽氨涓嶈兘琚瓙綾誨寲錛岃繖涔熻浼氬洜紲稿緱紱忥紝鍥犱負瀹冮紦鍔卞紑鍙戜漢鍛樹嬌鐢ㄥ鍚堬紝鑰屼笉鏄戶鎵褲?/p>

  • 浠栦滑涓庡叾浠栫殑闈欐佹柟娉曞疄闄呬笂娌℃湁浠諱綍鍖哄埆 濡傛灉API鏂囨。娌℃湁鏄庣‘鐨勮鏄庤繖鏄竴涓潤鎬佸伐紼嬫柟娉曪紝灝變細寰堥毦璇嗗埆鍑烘潵銆傞伒寰爣鍑嗙殑鍛藉悕瑙勮寖涔犳儻錛屽彲浠ュ譏琛ヨ繖涓鍔e娍錛屼笅闈㈠垪鍑轟竴浜涙儻鐢ㄥ懡鍚嶏細

    • valueOf - 榪欐牱鐨勯潤鎬佸伐鍘傛柟娉曞疄闄呬笂鏄被鍨嬭漿鎹?/p>

    • of - valueOf鐨勭畝媧佹柟寮?/p>

    • getInstance - 榪斿洖瀹炰緥閫氳繃鏂規硶鍙傛暟鎻忚堪錛屽浜庡崟渚嬶紝璇ユ柟娉曟病鏈夊弬鏁幫紝騫惰繑鍥炲敮涓鐨勫疄渚?/p>

    • newInstance - 涓巊etInstance涓嶅悓鐨勬槸錛屽畠榪斿洖鐨勫疄渚嬩笌鎵鏈夊叾瀹冨疄渚嬮兘鏄笉鍚岀殑

    • getType - 鍍廹etInstance涓鏍鳳紝浣嗘槸鍦ㄥ伐鍘傛柟娉曞浜庝笉鍚岀殑綾諱腑鐨勬椂鍊欎嬌鐢ㄣ俆ype琛ㄧずi榪斿洖瀵硅薄綾誨瀷

    • newType - 鍍弉ewInstance涓鏍鳳紝浣嗘槸鍦ㄥ伐鍘傛柟娉曞浜庝笉鍚岀殑綾諱腑鐨勬椂鍊欎嬌鐢ㄣ俆ype琛ㄧずi榪斿洖瀵硅薄綾誨瀷

2013-05-29


kuuyee 2013-05-30 17:09 鍙戣〃璇勮
]]>
褰揈ffectiveJava閬囪Guava - toString(瑙勫垯10)http://www.tkk7.com/kuuyee/archive/2013/05/29/399914.htmlkuuyeekuuyeeWed, 29 May 2013 03:40:00 GMThttp://www.tkk7.com/kuuyee/archive/2013/05/29/399914.htmlhttp://www.tkk7.com/kuuyee/comments/399914.htmlhttp://www.tkk7.com/kuuyee/archive/2013/05/29/399914.html#Feedback2http://www.tkk7.com/kuuyee/comments/commentRss/399914.htmlhttp://www.tkk7.com/kuuyee/services/trackbacks/399914.html

鎴戜滑閮界煡閬揓ava涔︾睄鏈夊洓澶у悕钁楋紝鍏朵腑 Effective Java鍙互璇存槸楂樻墜榪涢樁蹇呯湅鐨勶紝浣滆?nbsp;Joshua Bloch鏄疓oogle鐨勯甯璊ava鏋舵瀯甯堬紝濡傛灉鎶?James Gosling縐頒負Java涔嬬埗錛岄偅涔圝oshua Bloch灝卞儚鏄疛ava涔嬫瘝錛屾槸浠栨妸Java鍏昏偛鎴愪漢銆備箣鍓嶆浘鏈変漢璁ㄨ榪嘒oogle鏈夊緢澶氱紪鐮佽鑼冿紝涓轟粈涔堝敮鐙病鏈塉ava鐗堢殑闂錛屾渶緇堢殑緇撹灝辨槸錛?/span>Google鐨凧ava緙栫爜瑙勮寖灝辨槸 Effective Java涓涔?/strong>錛屽彲瑙佹涔︽湁澶氫箞閲嶈銆傜幇鍦℅oogle鍙堟帹鍑轟簡寮哄ぇ濂界敤鐨凧ava閫氱敤綾誨簱 Guava錛屽叕璁や負姣擜pache Common濂界敤錛屽洜涓篈pache瑕佸吋瀹硅佺増鏈紝鎵浠ュΘ紕嶄簡寰堝Java鐨勬柊鐗規х殑浣跨敤銆?/span>

鏃㈢劧Effective Java鍜孏uava閮借癁鐢熶簬Google錛岄偅涔堝綋浠栦滑鐩擱亣浼氫粈涔堟牱鍛紝涓烘鎴戝喅瀹氶噸娓〦ffective Java榪欓儴钁椾綔錛屽茍閽堝姣忎竴鏉¤鍒欏鎵綠uava緇欏嚭鐨勮В鍐蟲柟妗堬紝甯屾湜鑳芥洿娣卞叆鐨勬帉鎻ava銆?/p>

Effective Java絎?0鏉¤鍒欙細 濮嬬粓瑕佽鐩?/strong>toString鏂規硶

Effective Java閲屾寚鍑猴紝"寤鴻鎵鏈夌殑瀛愮被閮借鐩栬繖涓?tt>toString鏂規硶"錛岃繖鏍峰彲浠ヤ嬌綾葷敤璧鋒潵鏇村姞鑸掗傘傛渶閲嶈鐨勬槸榪欐牱鐨勫仛娉曞璋冭瘯闈炲父鏈夊府鍔╋紝Guava閫氳繃 Objects.toStringHelper涓烘垜浠彁渚涗簡鏂逛究鍒涘緩toString鐨勬柟娉曘傜湅涓嬮潰鐨勬牱渚嬶細

// Returns "ClassName{x=1}"
   Objects.toStringHelper(this)
       .add("x", 1)
       .toString();

   // Returns "MyObject{x=1}"
   Objects.toStringHelper("MyObject")
       .add("x", 1)
       .toString();


Guava鍏充簬toString鐨勬枃妗h繛鎺ワ細 https://code.google.com/p/guava-libraries/wiki/CommonObjectUtilitiesExplained

涓嬮潰鎴戞妸Effective Java鐨勬牱渚嬩唬鐮佸垪鍑猴紝騫剁敤Guava閲嶆柊浜?tt>toString鏂規硶

// 閲嶅啓PhoneNumber鐨則oString鏂規硶 - Effective Java涓枃絎簩鐗堢44欏?/span>
package org.effectivejava.examples.chapter03.item10;

import java.util.HashMap;
import java.util.Map;

import com.google.common.base.Objects;

public final class PhoneNumber {
        private final short areaCode;
        private final short prefix;
        private final short lineNumber;

        public PhoneNumber(int areaCode, int prefix, int lineNumber) {
                rangeCheck(areaCode, 999, "area code");
                rangeCheck(prefix, 999, "prefix");
                rangeCheck(lineNumber, 9999, "line number");
                this.areaCode = (short) areaCode;
                this.prefix = (short) prefix;
                this.lineNumber = (short) lineNumber;
        }

        private static void rangeCheck(int arg, int max, String name) {
                if (arg < 0 || arg > max)
                        throw new IllegalArgumentException(name + ": " + arg);
        }

        @Override
        public boolean equals(Object o) {
                if (o == this)
                        return true;
                if (!(o instanceof PhoneNumber))
                        return false;
                PhoneNumber pn = (PhoneNumber) o;
                return pn.lineNumber == lineNumber && pn.prefix == prefix
                                && pn.areaCode == areaCode;
        }

        @Override
        public int hashCode() {
                int result = 17;
                result = 31 * result + areaCode;
                result = 31 * result + prefix;
                result = 31 * result + lineNumber;
                return result;
        }

    //Effective Java鍘熸湁鐨則oString鏂規硶
        /*
         * @Override public String toString() { return
         * String.format("(%03d) %03d-%04d", areaCode, prefix, lineNumber); }
         */

        /**
         * 閲囩敤Guava瀹炵幇鐨則oString
         *
         */
        @Override
        public String toString() {
                return Objects.toStringHelper(this)
                                .addValue(String.format("(%03d) %03d-%04d", areaCode, prefix,lineNumber))
                                .add("areaCode", areaCode)
                                .add("prefix", prefix)
                                .add("lineNumber", lineNumber)
                                .toString();
        }

        public static void main(String[] args) {
                Map<PhoneNumber, String> m = new HashMap<PhoneNumber, String>();
                m.put(new PhoneNumber(707, 867, 5309), "Jenny");

                System.out.println(m);
        }
}

杈撳嚭瀵規瘮

//鍘熻緭鍑?br />{(707) 867-5309=Jenny}  

//Guava瀹炵幇杈撳嚭
{PhoneNumber{(707) 867-5309, areaCode=707, prefix=867, lineNumber=5309}=Jenny}

2013-05-24


kuuyee 2013-05-29 11:40 鍙戣〃璇勮
]]>
CDI鍦↗avaEE7涓崰鎹姝ら噸瑕佺殑鍦頒綅錛?/title><link>http://www.tkk7.com/kuuyee/archive/2013/05/17/399413.html</link><dc:creator>kuuyee</dc:creator><author>kuuyee</author><pubDate>Fri, 17 May 2013 07:40:00 GMT</pubDate><guid>http://www.tkk7.com/kuuyee/archive/2013/05/17/399413.html</guid><wfw:comment>http://www.tkk7.com/kuuyee/comments/399413.html</wfw:comment><comments>http://www.tkk7.com/kuuyee/archive/2013/05/17/399413.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/kuuyee/comments/commentRss/399413.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/kuuyee/services/trackbacks/399413.html</trackback:ping><description><![CDATA[<header style="line-height: 20px;"> <div style="width: 1270px; margin-right: auto; margin-left: auto;"> <h1 style="color: #4e443c; font-family: adelle, Georgia, 'Times New Roman', serif;"><span style="font-size: 21px; line-height: 30px;">浠庝笅闈㈢殑JavaEE7鏂扮壒鎬у垪琛ㄤ腑錛屼綘浼氬彂鐜癈DI鏄涔堢殑閲嶈錛屽畠鏃犲涓嶅湪錛?/span></h1><strong><span style="color: #4e443c; font-family: adelle, Georgia, 'Times New Roman', serif; font-size: 21px;">鍒板閮芥爣紺虹潃“</span><span style="color: #ff0066; font-family: adelle, Georgia, 'Times New Roman', serif; font-size: 21px;">CDI Integration</span><font color="#4e443c" face="adelle, Georgia, Times New Roman, serif"><span style="font-size: 21px;">”錛屾湰鏂囨憳鑷?nbsp;</span></font><a style="color: #0088cc; font-family: adelle, Georgia, 'Times New Roman', serif; font-size: 21px; text-decoration: none;">榪欓噷</a></strong><p> </p> </div> </header> <div style="width: 1270px; margin-right: auto; margin-left: auto; color: #4e443c; font-family: adelle, Georgia, 'Times New Roman', serif; line-height: 20px;"> <div style="text-align: left; color: #5a5a5a;"> <div style="margin-left: -30px;"> <div style="float: left; min-height: 1px; margin-left: 30px; width: 370px;"> <h2><u>EJB 3.2</u></h2> <p style="margin: 0px 0px 10px; font-size: 16px; line-height: 1.5;">Enterprise Java Bean 3.2 <a style="color: #0088cc; text-decoration: none;">(JSR 345)</a></p> <ul clearfix"="" style="padding: 0px; margin: 0px 0px 10px; list-style: none;"> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Enhancing EJB architecture to enable the PaaS model with features such as multi-tenancy</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Factorization of container-managed transactions to use other component technologies of the Java EE platform</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Enhanced use of annotations to simplify EJB programming model</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Alignment and integration with other specifications related to JSRs within the Java EE 7 platform such as<code style="padding: 2px 4px; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 30px; color: #dd1144; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; white-space: nowrap; background-color: #f7f7f9; border: 1px solid #e1e1e8;">CDI</code> , JMS, Bean Validation, etc</li> </ul> <h2><u>EL 3.0</u></h2> <p style="margin: 0px 0px 10px; font-size: 16px; line-height: 1.5;">Expression Language 3.0 <a style="color: #0088cc; text-decoration: none;">(JSR 341)</a></p> <ul clearfix"="" style="padding: 0px; margin: 0px 0px 10px; list-style: none;"> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Separate expression language context into parsing and evaluation contexts independent of the JSP specification</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Introduction of new customizable expression language coercion rules</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Reference static methods and members directly in EL expressions without having to define them in Tag Library Descriptor, similar to instance method invocation</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Adding equality, string concatenation, and sizeof operators</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> <code style="padding: 2px 4px; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 30px; color: #dd1144; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; white-space: nowrap; background-color: #f7f7f9; border: 1px solid #e1e1e8;">CDI</code> Integration so that +events+ can be generated before/during/after the expressions are evaluated</li> </ul> <h2><u>JMS 2.0</u></h2> <p style="margin: 0px 0px 10px; font-size: 16px; line-height: 1.5;">Java Messaging Service 2.0 <a style="color: #0088cc; text-decoration: none;">(JSR 343) </a>The new introduction will be an evolution of the previous version, JSR-914.</p> <ul clearfix"="" style="padding: 0px; margin: 0px 0px 10px; list-style: none;"> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Enhanced JMS programming model to make application development easier, cleaning up ambiguities in the present specification</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Enhanced integration with <code style="padding: 2px 4px; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 30px; color: #dd1144; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; white-space: nowrap; background-color: #f7f7f9; border: 1px solid #e1e1e8;">CDI</code> for easier and more unified use of API</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Make necessary changes to API in allowing any JMS provider to integrate with any Java EE containerinvocation</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Make JSR more cloud-friendly, leveraging multi-tenancy and other cloud-related features from the platform</li> </ul> <h2><u>EL 3.0</u></h2> <p style="margin: 0px 0px 10px; font-size: 16px; line-height: 1.5;">Expression Language 3.0 <a style="color: #0088cc; text-decoration: none;">(JSR 341)</a></p> <ul clearfix"="" style="padding: 0px; margin: 0px 0px 10px; list-style: none;"> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Separate expression language context into parsing and evaluation contexts independent of the JSP specification</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Introduction of new customizable expression language coercion rules</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Reference static methods and members directly in EL expressions without having to define them in Tag Library Descriptor, similar to instance method invocation</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Adding equality, string concatenation, and sizeof operators</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> <code style="padding: 2px 4px; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 30px; color: #dd1144; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; white-space: nowrap; background-color: #f7f7f9; border: 1px solid #e1e1e8;">CDI</code> Integration so that events can be generated before/during/after the expressions are evaluated</li> </ul> </div> <div style="float: left; min-height: 1px; margin-left: 30px; width: 370px;"> <h2><u>Servlet 3.1</u></h2> <p style="margin: 0px 0px 10px; font-size: 16px; line-height: 1.5;">Java Servlet 3.2 <a style="color: #0088cc; text-decoration: none;">(JSR 340) </a>Servlet鏃╁湪JavaEE6灝卞凡緇忔棤緙濋泦鎴愪簡 <code style="padding: 2px 4px; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 30px; color: #dd1144; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; white-space: nowrap; background-color: #f7f7f9; border: 1px solid #e1e1e8;">CDI</code></p> <ul clearfix"="" style="padding: 0px; margin: 0px 0px 10px; list-style: none;"> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Optimize Java EE PaaS model, leveraging the cloud for Web applications</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Optimizing PaaS model leveraging multi-tenancy. To support this into the Web container, the main areas of optimization will be security, session state, resources and</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> other multi-tenant awareness requirements for Web applications.</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Enhance the asynchronous support of Servlet 3.0 and simplify further in building asynchronous applications</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Utilize Java EE concurrency APIs for asynchronous support</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Enhance the Servlet 3.0 built-in security features</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Optimize the built-in plug-ability support of Servlet 3.0</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Focus on providing necessary functionality for building easier-to-use, high-level protocol support for Web Sockets and other protocols that work with HTTP in the Servlet API</li> </ul> <h2><u>JAX-RS 2.0</u></h2> <p style="margin: 0px 0px 10px; font-size: 16px; line-height: 1.5;">Java API for RESTful Web Services 2.0 <a style="color: #0088cc; text-decoration: none;">(JSR 339)</a></p> <ul clearfix"="" style="padding: 0px; margin: 0px 0px 10px; list-style: none;"> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Define two client APIs, both REST-compatible -- a low-level API using builder pattern and a higher-level API leveraging the low-level APIs</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Hypermedia, an important RESTful feature of Web applications, will be easy to create, and it will process links associated with resources in representation either as a header or as a links within the entity peripheral.</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Make it possible to validate parameters of forms or query using bean validation and return a meaningful response on failure to validate</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Closer integration <code style="padding: 2px 4px; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 30px; color: #dd1144; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; white-space: nowrap; background-color: #f7f7f9; border: 1px solid #e1e1e8;">CDI</code> @Inject</li> </ul> <h2><u>JSF 2.2</u></h2> <p style="margin: 0px 0px 10px; font-size: 16px; line-height: 1.5;">Java Server Faces 2.2 <a style="color: #0088cc; text-decoration: none;">(JSR 344)</a></p> <ul clearfix"="" style="padding: 0px; margin: 0px 0px 10px; list-style: none;"> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Making configuration options dynamic, eliminate tag handler class even for non-composite JSP components, introduce shorthand URLs for Facelet Tag Libraries, make cc:interface in composite components optional, enhance deployment, integrate with <code style="padding: 2px 4px; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 30px; color: #dd1144; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; white-space: nowrap; background-color: #f7f7f9; border: 1px solid #e1e1e8;">CDI</code></li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Component identification and Ajax</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Support implementation of Portlet Bridge 2.0</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Support for HTML5 features, such as Forms, Heading, Metadata and Section content model, Flow management, Listener for page navigation events, and new components like FileUpload and BackButton</li> </ul> <h2><u>CDI 1.1</u></h2> <p style="margin: 0px 0px 10px; font-size: 16px; line-height: 1.5;">Context and Dependency Injection 1.1 <a style="color: #0088cc; text-decoration: none;">(JSR 346)</a></p> <ul clearfix"="" style="padding: 0px; margin: 0px 0px 10px; list-style: none;"> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Global ordering of interceptors and decorators,</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> API for managing built-in context,</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Embedded mode to allow startup outside the Java EE container</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Declarative control over which packages/classes are scanned in a bean archive</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Bean declaration at constructor level</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Injection for static members, such as loggers</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Send <code style="padding: 2px 4px; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 30px; color: #dd1144; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; white-space: nowrap; background-color: #f7f7f9; border: 1px solid #e1e1e8;">CDI</code> events for Servlet events</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Better support for <code style="padding: 2px 4px; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 30px; color: #dd1144; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; white-space: nowrap; background-color: #f7f7f9; border: 1px solid #e1e1e8;">CDI</code> in libraries when used in the Java EE platform</li> </ul> </div> <div style="float: left; min-height: 1px; margin-left: 30px; width: 370px;"> <h2><u>JPA 2.1</u></h2> <p style="margin: 0px 0px 10px; font-size: 16px; line-height: 1.5;">Java Persistence API 2.1 <a style="color: #0088cc; text-decoration: none;">(JSR 338)</a></p> <ul clearfix"="" style="padding: 0px; margin: 0px 0px 10px; list-style: none;"> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Addition of the javax.persistence.StoredProcedureQuery interface to control stored procedure query execution. >Javax.persistence.EntityManager has added four variants of methods that return a StoredProcedureQuery for executing a stored procedure, including one allowing named stored procedure query. The newly introduced annotation @NamedStoredProcedureQuery can be specified on an entity or mapped class, similar to the @NamedQuery. The parameters IN, OUT and INOUT can be used to manipulate values from the stored procedure.</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> The javax.persistence.criteria.AbstractQuery interface has been refactored by CriteriaUpdate, CriteriaDelete and CommonAbstractQuery interfaces.</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Added new identifiers for persistence query language (JPQL), such as FUNCTION for supporting JPQL built-in functions, TREAT for down casting within path expressions in the FROM and WHERE clauses, and ON for specifying the relationship between the tables.</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> <code style="padding: 2px 4px; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 30px; color: #dd1144; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; white-space: nowrap; background-color: #f7f7f9; border: 1px solid #e1e1e8;">CDI</code> Integration Listener.The entity listeners can be annotated with @PostConstruct and @PostDestroy for their lifecycle. Also, the usual lifecycle callback methods, such as @PrePersist, @PostPersist, @PreUpdate and @PreRemove can be used for entities.</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Added support for unsynchronized persistence context to create container-managed unsynchronized persistence context. For example, @PersistenceContext (synchronization=SynchronizationType.UNSYNCHRONIZED)</li> </ul> <h2><u>Bean Validation 1.1</u></h2> <p style="margin: 0px 0px 10px; font-size: 16px; line-height: 1.5;">Bean Validation 1.1 <a style="color: #0088cc; text-decoration: none;">(JSR 349)</a></p> <ul clearfix"="" style="padding: 0px; margin: 0px 0px 10px; list-style: none;"> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Integration with other Java EE specs錛?nbsp;<code style="padding: 2px 4px; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 30px; color: #dd1144; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; white-space: nowrap; background-color: #f7f7f9; border: 1px solid #e1e1e8;">CDI</code> etc.</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> APIs to validate parameters and return values of method calls.</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Validate parameters and return values on HTTP calls</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Ability to translate a group into another group while cascading the validation</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> APIs to validate parameters and return values of method calls</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Apply constraints on group collection</li> <li style="line-height: 25px; float: left; width: 370px;"><em style="display: inline-block; width: 14px; height: 14px; margin-top: 1px; line-height: 14px; vertical-align: text-top; background-image: url(http://10.128.143.87:4242/images/glyphicons-halflings.png); background-position: -433px -96px; background-repeat: no-repeat no-repeat;"></em> Extend the model to support AND and OR style composition</li> </ul> </div> </div> </div> </div>  <img src ="http://www.tkk7.com/kuuyee/aggbug/399413.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/kuuyee/" target="_blank">kuuyee</a> 2013-05-17 15:40 <a href="http://www.tkk7.com/kuuyee/archive/2013/05/17/399413.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>CDI(JSR-346)-JavaEE騫沖彴涓婁笅鏂囦緷璧栨敞鍏ヨ鑼?1.1 鏂扮壒鎬?/title><link>http://www.tkk7.com/kuuyee/archive/2013/05/09/399037.html</link><dc:creator>kuuyee</dc:creator><author>kuuyee</author><pubDate>Thu, 09 May 2013 03:47:00 GMT</pubDate><guid>http://www.tkk7.com/kuuyee/archive/2013/05/09/399037.html</guid><wfw:comment>http://www.tkk7.com/kuuyee/comments/399037.html</wfw:comment><comments>http://www.tkk7.com/kuuyee/archive/2013/05/09/399037.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/kuuyee/comments/commentRss/399037.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/kuuyee/services/trackbacks/399037.html</trackback:ping><description><![CDATA[<div style="width: 1170px; margin-right: auto; margin-left: auto; color: #4e443c; font-family: adelle, Georgia, 'Times New Roman', serif; line-height: 20px;"><div style="margin-left: -30px;"><div style="float: left; min-height: 1px; margin-left: 30px; width: 870px;"><div style="background-color: #fcfcfa; border: 1px solid #e2e0d8; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; padding: 22px; margin-bottom: 35px;"><h2><span style="font-size: 14px;">涓昏鍔熻兘鏀硅繘</span></h2><div><div><p style="margin: 0px 0px 10px;">榪欎簺涓昏鍔熻兘鏀瑰彉宸茬粡鍦–DI 1.1涓紩鍏ワ細</p></div><div><ul style="padding: 0px; margin: 0px 0px 10px 25px;"><li><p style="margin: 0px 0px 10px;">鍔犲叆鍏ㄥ眬鎷︽埅鍣?(鍙傞槄Java Interceptors Specification 1.2)錛?鍏ㄥ眬瑁呴グ鍣?鍜屼嬌鐢?tt>@Priority</tt>娉ㄨВ瀹炵幇鏇夸唬閫夋嫨</p></li><li><p style="margin: 0px 0px 10px;">緇欐敞瑙d負<tt>@AroundConstruct</tt>鐨勬瀯閫犲櫒鍔犲叆鐢熷懡鍛ㄦ湡鍥炶皟鏀寔 (鍙傞槄 Java Interceptors Specification 1.2)</p></li><li><p style="margin: 0px 0px 10px;">鍏佽緇戝畾鎷︽埅鏋勯犲櫒</p></li><li><p style="margin: 0px 0px 10px;">鎷︽埅鍣ㄧ粦瀹氱Щ鍏ユ嫤鎴櫒瑙勮寖錛屼互渚涘叾瀹冭鑼冧嬌鐢?/p></li><li><p style="margin: 0px 0px 10px;">Beans鍐呭緩鏀寔瑁呴グ鍣?nbsp;</p></li><li><p style="margin: 0px 0px 10px;">鍔犲叆<tt>EventMetadata</tt>鍏佽浜嬩歡鍏冩暟鎹鏌?/p></li><li><p style="margin: 0px 0px 10px;">鍔犲叆 <tt>@Vetoed</tt> 娉ㄨВ璁〤lasses澶卞幓鍘熸湁紼嬪簭鑳藉姏</p></li><li><p style="margin: 0px 0px 10px;">寰堝鏀硅繘鏉ュ己鍖朾eans鍔熻兘錛屽寘鎷?nbsp;<tt>@TransientReference</tt> 娉ㄨВ鍏佽淇濈暀瀹炲姏緇欒皟鐢ㄥ畠鐨勬柟娉曟垨鏋勯犲嚱鏁?nbsp;</p></li><li><p style="margin: 0px 0px 10px;">鍔犲叆嬋媧誨拰閿姣佸懆鏈熺殑浜嬩歡鍥炶皟 </p></li><li><p style="margin: 0px 0px 10px;">鍔犲叆 <tt>AlterableContext</tt> 鍏佽bean瀹炰緥琚槑紜殑閿姣?/p></li><li><p style="margin: 0px 0px 10px;">緇檅ean鍦ㄥ懆鏈熸敞瑙c丒JB銆佸湪JavaEE涓嚜鍚姩CDI鍔熻兘 </p></li><li><p style="margin: 0px 0px 10px;">鍦?nbsp;<tt>bean.xml</tt>涓姞鍏lass榪囨護鎺掗櫎錛屼互闃叉鎵弿classes鍜宲ackage </p></li><li><p style="margin: 0px 0px 10px;">鍔犲叆 <tt>Unmanaged</tt> 鍏佽鏂逛究鐨勮闂棤涓婁笅鏂囩殑bean瀹炰緥</p></li><li><p style="margin: 0px 0px 10px;">鍔犲叆 <tt>CDI</tt> 浠ユ柟渚跨殑璁塊棶褰撳墠鐨凜DI瀹瑰櫒</p></li><li><p style="margin: 0px 0px 10px;">鍔犲叆 <tt>AfterTypeDiscovery</tt>浜嬩歡錛屽厑璁稿湪綾誨瀷鍙戠幇涔嬪悗鎵╁睍闄勫姞娉ㄥ唽</p></li><li><p style="margin: 0px 0px 10px;">鍔犲叆 <tt>@WithAnnotation</tt> 娉ㄨВ浣滀負涓縐嶆敼鍠勮礋杞芥ц兘鐨勬柟寮?/p></li><li><p style="margin: 0px 0px 10px;">鍦ㄤ究鎼虹殑鎵╁睍鍔犲叆寰堝嬈¤鐨勬敼榪?/p></li></ul></div></div><p style="margin: 0px 0px 10px;"></p><div>2013-05-09</div></div></div></div></div><footer style="text-align: center; padding: 20px 0px; margin-top: 20px; border-top-width: 1px; border-top-style: solid; border-top-color: #e5e5e5; background-color: #f5f5f5; color: #4e443c; font-family: adelle, Georgia, 'Times New Roman', serif; line-height: 20px;"><div style="width: 1170px; margin-right: auto; margin-left: auto;"></div></footer><img src ="http://www.tkk7.com/kuuyee/aggbug/399037.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/kuuyee/" target="_blank">kuuyee</a> 2013-05-09 11:47 <a href="http://www.tkk7.com/kuuyee/archive/2013/05/09/399037.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Eclipse閰嶈壊鏂規鎻掍歡 鐪熸紓浜紒http://www.tkk7.com/kuuyee/archive/2013/02/26/395728.htmlkuuyeekuuyeeTue, 26 Feb 2013 02:43:00 GMThttp://www.tkk7.com/kuuyee/archive/2013/02/26/395728.htmlhttp://www.tkk7.com/kuuyee/comments/395728.htmlhttp://www.tkk7.com/kuuyee/archive/2013/02/26/395728.html#Feedback3http://www.tkk7.com/kuuyee/comments/commentRss/395728.htmlhttp://www.tkk7.com/kuuyee/services/trackbacks/395728.html鏈榪戝彂鐜頒簡涓涓狤clipse閰嶈壊鏂規鎻掍歡錛岃繖鍥炵粰Eclipse閰嶈壊澶柟渚夸簡銆?/p>

鎻掍歡涓婚〉錛?a style="color: #0088cc; text-decoration: initial;">http://eclipsecolorthemes.org/

鎻掍歡鎻愪緵浜嗕笂涓囩閰嶈壊鏂規錛岄潪甯告紓浜紝涓婂浘鐪嬩笅錛?/p>

瀹夎寰堢畝鍗曪紝鎵撳紑 Eclipse Marketplace

鏌ユ壘 Eclipse Color Theme錛屼細鎵懼埌榪欎釜鎻掍歡銆?/p>


瀹夎瀹屾垚鍚庤繘鍏?nbsp;Preferences —> Appearance —> Color Theme 灝卞彲閫夋嫨涓婚浜?/p>



kuuyee 2013-02-26 10:43 鍙戣〃璇勮
]]>
Jboss Seam2.3.0.BETA1鍙戝竷http://www.tkk7.com/kuuyee/archive/2012/04/08/373585.htmlkuuyeekuuyeeSun, 08 Apr 2012 12:00:00 GMThttp://www.tkk7.com/kuuyee/archive/2012/04/08/373585.htmlhttp://www.tkk7.com/kuuyee/comments/373585.htmlhttp://www.tkk7.com/kuuyee/archive/2012/04/08/373585.html#Feedback0http://www.tkk7.com/kuuyee/comments/commentRss/373585.htmlhttp://www.tkk7.com/kuuyee/services/trackbacks/373585.htmlJboss鍦?鏈?0鍙峰彂甯冧簡Seam2.3.0.BETA1錛?/span>Release Notes濡備笅錛?br />
  • 淇浜嗗ぇ閲忕殑Bug
  • 鍏ㄩ潰鏀寔JSF2
  • 鍔犲叆 bean validation 鍜?EJB 3.1 鐨勬敮鎸?/li>
  • 鍗囩駭Drools鐗堟湰鑷?.1
  • 鍗囩駭Junit鐗堟湰鑷?
  • 鏇存柊澶ч噺渚嬪瓙鏀寔JSF2
Jboss Seam璁″垝鍦ㄨ繖涓湀鍙戝竷鍙︿竴涓噷紼嬬 2.3.0.Beta2錛岄愭瀹屽杽 Arquillian 鍜?Seam Gen 鐗規с傚叾鍚庡氨闆嗕腑鍦?2.3.0 鐨凚UG 淇涓娿?nbsp;

涓嬭澆錛?/span>http://www.seamframework.org/Seam2/Downloads 
鏂囨。錛?/span>http://www.seamframework.org/Seam2/Seam2Documentation. 

kuuyee 2012-04-08 20:00 鍙戣〃璇勮
]]>
鐢╓eblogic WLST鑴氭湰 榪滅▼閮ㄧ講Web搴旂敤http://www.tkk7.com/kuuyee/archive/2011/10/13/361213.htmlkuuyeekuuyeeThu, 13 Oct 2011 15:46:00 GMThttp://www.tkk7.com/kuuyee/archive/2011/10/13/361213.htmlhttp://www.tkk7.com/kuuyee/comments/361213.htmlhttp://www.tkk7.com/kuuyee/archive/2011/10/13/361213.html#Feedback1http://www.tkk7.com/kuuyee/comments/commentRss/361213.htmlhttp://www.tkk7.com/kuuyee/services/trackbacks/361213.html
 1 import re
 2  
 3 warPath = 'helloWebApp'
 4 serverUrl = 't3://192.168.1.100:7001'
 5 username = 'weblogic'
 6 password = 'weblogic'
 7 targetServer="examplesServer"
 8 deployAppName='DeployExample2'
 9 
10  
11 connect(username, password, serverUrl)
12  
13 appList = re.findall(deployAppName, ls('/AppDeployments'))
14 print "========================="
15 print len(appList)
16 if len(appList) > 0:
17     #oldestArchiveVersion = min(map(int, appList))
18     print 'come in!!!'            
19     undeploy(deployAppName)
20  
21 #deploy(appName='DeployExample', path = 'helloWebApp', targets = 'examplesServer',timeout=600000, block = 'true')
22 
23 deploy(deployAppName, warPath, targets=targetServer, securityModel = "Advanced",timeout=600000, block = "true")
24 exit()
Ok

kuuyee 2011-10-13 23:46 鍙戣〃璇勮
]]>
JBoss AS7閰嶇疆MySQL鏁版嵁婧?/title><link>http://www.tkk7.com/kuuyee/archive/2011/07/19/354598.html</link><dc:creator>kuuyee</dc:creator><author>kuuyee</author><pubDate>Tue, 19 Jul 2011 02:49:00 GMT</pubDate><guid>http://www.tkk7.com/kuuyee/archive/2011/07/19/354598.html</guid><wfw:comment>http://www.tkk7.com/kuuyee/comments/354598.html</wfw:comment><comments>http://www.tkk7.com/kuuyee/archive/2011/07/19/354598.html#Feedback</comments><slash:comments>4</slash:comments><wfw:commentRss>http://www.tkk7.com/kuuyee/comments/commentRss/354598.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/kuuyee/services/trackbacks/354598.html</trackback:ping><description><![CDATA[     鎽樿: AS7榛樷嬭鈥嬬殑鈥嬫暟鈥嬫嵁鈥嬫簮鈥嬫槸鈥婬2錛岃櫧鈥嬬劧鈥婬2鏂光嬩究鈥嬶紝浣嗏嬫槸鈥嬩竴鈥嬭埇鈥嬬殑鈥嬬敓鈥嬩駭鈥嬬幆鈥嬪鈥嬮兘鈥嬫槸鈥婱ySQL銆佲婳RACLE銆佲婼QLServer灞呪嬪鈥嬶紝鏈嬫枃鈥嬫弿鈥嬭堪鈥嬪鈥嬩綍鈥嬪湪鈥婣S7閰嶁嬬疆鈥婱ySQL鏁扳嬫嵁鈥嬫簮鈥嬨?nbsp; <a href='http://www.tkk7.com/kuuyee/archive/2011/07/19/354598.html'>闃呰鍏ㄦ枃</a><img src ="http://www.tkk7.com/kuuyee/aggbug/354598.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/kuuyee/" target="_blank">kuuyee</a> 2011-07-19 10:49 <a href="http://www.tkk7.com/kuuyee/archive/2011/07/19/354598.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>JBoss AS7 鍙戝竷http://www.tkk7.com/kuuyee/archive/2011/07/13/354224.htmlkuuyeekuuyeeWed, 13 Jul 2011 01:43:00 GMThttp://www.tkk7.com/kuuyee/archive/2011/07/13/354224.htmlhttp://www.tkk7.com/kuuyee/comments/354224.htmlhttp://www.tkk7.com/kuuyee/archive/2011/07/13/354224.html#Feedback0http://www.tkk7.com/kuuyee/comments/commentRss/354224.htmlhttp://www.tkk7.com/kuuyee/services/trackbacks/354224.html闃呰鍏ㄦ枃

kuuyee 2011-07-13 09:43 鍙戣〃璇勮
]]>
JavaEE6 FAQs 涔婡Modelhttp://www.tkk7.com/kuuyee/archive/2011/07/12/354161.htmlkuuyeekuuyeeTue, 12 Jul 2011 06:14:00 GMThttp://www.tkk7.com/kuuyee/archive/2011/07/12/354161.htmlhttp://www.tkk7.com/kuuyee/comments/354161.htmlhttp://www.tkk7.com/kuuyee/archive/2011/07/12/354161.html#Feedback0http://www.tkk7.com/kuuyee/comments/commentRss/354161.htmlhttp://www.tkk7.com/kuuyee/services/trackbacks/354161.html闃呰鍏ㄦ枃

kuuyee 2011-07-12 14:14 鍙戣〃璇勮
]]>
(緲昏瘧)JavaEE6瑙勮寖 CDI鏁欑▼絎簲閮ㄥ垎http://www.tkk7.com/kuuyee/archive/2011/07/12/354145.htmlkuuyeekuuyeeTue, 12 Jul 2011 02:38:00 GMThttp://www.tkk7.com/kuuyee/archive/2011/07/12/354145.htmlhttp://www.tkk7.com/kuuyee/comments/354145.htmlhttp://www.tkk7.com/kuuyee/archive/2011/07/12/354145.html#Feedback0http://www.tkk7.com/kuuyee/comments/commentRss/354145.htmlhttp://www.tkk7.com/kuuyee/services/trackbacks/354145.html闃呰鍏ㄦ枃

kuuyee 2011-07-12 10:38 鍙戣〃璇勮
]]>
(緲昏瘧)JavaEE6瑙勮寖 CDI鏁欑▼絎洓閮ㄥ垎http://www.tkk7.com/kuuyee/archive/2011/06/28/353291.htmlkuuyeekuuyeeTue, 28 Jun 2011 10:26:00 GMThttp://www.tkk7.com/kuuyee/archive/2011/06/28/353291.htmlhttp://www.tkk7.com/kuuyee/comments/353291.htmlhttp://www.tkk7.com/kuuyee/archive/2011/06/28/353291.html#Feedback4http://www.tkk7.com/kuuyee/comments/commentRss/353291.htmlhttp://www.tkk7.com/kuuyee/services/trackbacks/353291.html闃呰鍏ㄦ枃

kuuyee 2011-06-28 18:26 鍙戣〃璇勮
]]>
Maven欏圭洰甯歌闂瀹炴垬(涓) 瑙e喅鐩鎬簰渚濊禆http://www.tkk7.com/kuuyee/archive/2011/06/28/353158.htmlkuuyeekuuyeeTue, 28 Jun 2011 04:40:00 GMThttp://www.tkk7.com/kuuyee/archive/2011/06/28/353158.htmlhttp://www.tkk7.com/kuuyee/comments/353158.htmlhttp://www.tkk7.com/kuuyee/archive/2011/06/28/353158.html#Feedback1http://www.tkk7.com/kuuyee/comments/commentRss/353158.htmlhttp://www.tkk7.com/kuuyee/services/trackbacks/353158.html闃呰鍏ㄦ枃

kuuyee 2011-06-28 12:40 鍙戣〃璇勮
]]>
(緲昏瘧)JavaEE6瑙勮寖 CDI鏁欑▼絎笁閮ㄥ垎http://www.tkk7.com/kuuyee/archive/2011/06/20/352650.htmlkuuyeekuuyeeMon, 20 Jun 2011 03:43:00 GMThttp://www.tkk7.com/kuuyee/archive/2011/06/20/352650.htmlhttp://www.tkk7.com/kuuyee/comments/352650.htmlhttp://www.tkk7.com/kuuyee/archive/2011/06/20/352650.html#Feedback1http://www.tkk7.com/kuuyee/comments/commentRss/352650.htmlhttp://www.tkk7.com/kuuyee/services/trackbacks/352650.html闃呰鍏ㄦ枃

kuuyee 2011-06-20 11:43 鍙戣〃璇勮
]]>
(緲昏瘧)JavaEE6瑙勮寖 CDI鏁欑▼絎簩閮ㄥ垎http://www.tkk7.com/kuuyee/archive/2011/06/17/352490.htmlkuuyeekuuyeeFri, 17 Jun 2011 03:10:00 GMThttp://www.tkk7.com/kuuyee/archive/2011/06/17/352490.htmlhttp://www.tkk7.com/kuuyee/comments/352490.htmlhttp://www.tkk7.com/kuuyee/archive/2011/06/17/352490.html#Feedback0http://www.tkk7.com/kuuyee/comments/commentRss/352490.htmlhttp://www.tkk7.com/kuuyee/services/trackbacks/352490.html  闃呰鍏ㄦ枃

kuuyee 2011-06-17 11:10 鍙戣〃璇勮
]]>
(緲昏瘧)JavaEE6瑙勮寖 CDI鏁欑▼絎竴閮ㄥ垎http://www.tkk7.com/kuuyee/archive/2011/06/16/352421.htmlkuuyeekuuyeeThu, 16 Jun 2011 06:03:00 GMThttp://www.tkk7.com/kuuyee/archive/2011/06/16/352421.htmlhttp://www.tkk7.com/kuuyee/comments/352421.htmlhttp://www.tkk7.com/kuuyee/archive/2011/06/16/352421.html#Feedback1http://www.tkk7.com/kuuyee/comments/commentRss/352421.htmlhttp://www.tkk7.com/kuuyee/services/trackbacks/352421.htmlCDI鏄嬩緷鈥嬭禆鈥嬫敞鈥嬪叆鈥?DI)鍜屸嬫嫤鈥嬫埅鈥?AOP)鐨勨婮ava鏍団嬪噯鈥嬭鈥嬭寖鈥嬨傗婦I鍜屸婣OP鏈夆嬬潃鈥嬪緢鈥嬮珮鈥嬬殑鈥嬬煡鈥嬪悕鈥嬪害鈥嬶紝Java闇鈥嬭鈥嬪鈥嬬悊鈥婦I鍜屸婣OP浠モ嬩究鈥嬪湪鈥嬫鈥嬩箣鈥嬩笂鈥嬫瀯鈥嬪緩鈥嬪叾鈥嬪畠鈥嬬殑鈥嬫爣鈥嬪噯鈥嬨傗婦I鍜屸婣OP鏄嬪緢鈥嬪鈥婮ava妗嗏嬫灦鈥嬬殑鈥嬪熀鈥嬬鈥嬨傗?
CDI鏄婮avaEE 6鐨勨嬪熀鈥嬬鈥嬨傗嬪畠鈥嬪緢鈥嬪揩鈥嬪氨鈥嬪緱鈥嬪埌鈥嬩簡鈥婥aucho's Resin銆佲婭BM's WebSphere銆佲婳racle's Glassfish銆佲婻ed Hat's JBoss鍜屸嬩紬鈥嬪鈥嬪簲鈥嬬敤鈥嬫湇鈥嬪姟鈥嬪櫒鈥嬬殑鈥嬫敮鈥嬫寔鈥嬨傗婥DI涓庘婼pring鍜屸婫uice妗嗏嬫灦鈥嬮潪鈥嬪父鈥嬬浉鈥嬩技鈥嬶紝灝扁嬪儚鈥婮PA寰堚嬪儚鈥婳RM銆傗婥DI綆鈥嬪寲鈥嬩簡鈥嬪鈥嬩簬鈥婦I鍜屸婣OP鐨勨婣PI銆傗嬪鈥嬫灉鈥嬩綘鈥嬩嬌鈥嬬敤鈥嬭繃鈥婼pring鎴栤嬭呪婫uice錛屼綘鈥嬩細鈥嬪彂鈥嬬幇鈥婥DI鏇粹嬪鈥嬫槗  闃呰鍏ㄦ枃

kuuyee 2011-06-16 14:03 鍙戣〃璇勮
]]>
Ceylon璇█浠嬬粛絎竴閮ㄥ垎錛堢炕璇戯級鈥斺擧ibernate涔嬬埗鐨勫張涓鍔涗綔http://www.tkk7.com/kuuyee/archive/2011/05/24/350885.htmlkuuyeekuuyeeMon, 23 May 2011 23:25:00 GMThttp://www.tkk7.com/kuuyee/archive/2011/05/24/350885.htmlhttp://www.tkk7.com/kuuyee/comments/350885.htmlhttp://www.tkk7.com/kuuyee/archive/2011/05/24/350885.html#Feedback1http://www.tkk7.com/kuuyee/comments/commentRss/350885.htmlhttp://www.tkk7.com/kuuyee/services/trackbacks/350885.htmlCeylon鏄竴闂ㄦ柊鐨勮璦錛屽畠榪愯鍦↗ava铏氭嫙鏈轟笂錛岀洰鍓嶆鏈夋垜鎵鍦ㄧ殑灝忕粍寮鍙戯紝瀹冮毝灞炰簬RedHat銆傛垜浠兘鏄疛ava鍜孞ava鐢熸佺郴緇熺殑綺変笣錛屽洜涓哄畠鐨勫疄鐢ㄦс佸箍闃旂殑鏂囧寲姘涘洿鍜屽紑鍙戠ぞ鍖恒佸ぉ鐢熼傜敤浜庡晢涓氬簲鐢ㄤ互鍙婂彲縐繪鎬с傜劧鑰屾垜浠繀欏繪壙璁よ繖闂ㄨ璦鍜屽叾鐜版湁鐨勭被搴擄紝宸茬粡榪囦簡15騫寸殑鍙戝睍錛屽畠涓嶈兘鍐嶆彁渚涙洿濂界殑鍔熻兘鏉ヨВ鍐崇幇鍦ㄧ殑鍟嗕笟闂銆?nbsp; 闃呰鍏ㄦ枃

kuuyee 2011-05-24 07:25 鍙戣〃璇勮
]]>
XSL鍏ラ棬(緲昏瘧)http://www.tkk7.com/kuuyee/archive/2011/03/09/345993.htmlkuuyeekuuyeeWed, 09 Mar 2011 00:58:00 GMThttp://www.tkk7.com/kuuyee/archive/2011/03/09/345993.htmlhttp://www.tkk7.com/kuuyee/comments/345993.htmlhttp://www.tkk7.com/kuuyee/archive/2011/03/09/345993.html#Feedback1http://www.tkk7.com/kuuyee/comments/commentRss/345993.htmlhttp://www.tkk7.com/kuuyee/services/trackbacks/345993.html鏈功涓嶉敊,鎵浠ョ炕璇戜簡涓涓媂SL鐨勫叆闂ㄩ儴鍒?
XSL鏄嬩竴鈥嬩釜鈥嬫ā鈥嬫澘鈥嬭鈥嬭█鈥嬶紝鑰屸嬩笉鈥嬫槸鈥嬩竴鈥嬩釜鈥嬬▼鈥嬪簭鈥嬭鈥嬭█鈥嬨傗嬭繖鈥嬫剰鈥嬪懗鈥嬬潃鈥媠tylesheet鍒垛嬪畾鈥嬩簡鈥嬩竴鈥嬩釜鈥嬭緭鈥嬪嚭鈥嬫牱鈥嬫湰鈥嬶紝鑰屸嬩笉鈥嬫槸鈥嬩嬌鈥嬬敤鈥嬬▼鈥嬪簭鈥嬫寜鈥嬫鈥嬮鈥嬬敓鈥嬫垚鈥嬨傗嬩竴鈥嬩釜鈥媠tylesheet鍖呪嬪惈鈥嬩簡鈥嬩竴鈥嬩釜鈥嬫販鈥嬪悎鈥嬬殑鈥嬭緭鈥嬪嚭鈥嬫牱鈥嬫湰鈥嬶紝騫垛嬩笖鈥嬩負鈥嬫瘡鈥嬩釜鈥嬫牱鈥嬫湰鈥嬩僵鈥嬫埓鈥嬩簡鈥嬭緭鈥嬪嚭鈥嬫寚鈥嬩護鈥嬨傗嬫瘡鈥嬩竴鈥嬩釜鈥嬫檽鈥嬪緱鈥嬭緭鈥嬪嚭鈥嬫牱鈥嬫湰鈥嬪姞鈥嬩笂鈥嬪鈥嬬悊鈥嬫寚鈥嬩護鈥嬪氨鈥嬫瀯鈥嬫垚鈥嬩簡鈥嬩竴鈥嬩釜鈥嬫ā鈥嬫澘鈥嬨傗?
  闃呰鍏ㄦ枃

kuuyee 2011-03-09 08:58 鍙戣〃璇勮
]]>
瑁呰澆宓屽叆寮廕Boss鍒癟omat涓?/title><link>http://www.tkk7.com/kuuyee/archive/2011/03/08/345915.html</link><dc:creator>kuuyee</dc:creator><author>kuuyee</author><pubDate>Tue, 08 Mar 2011 01:19:00 GMT</pubDate><guid>http://www.tkk7.com/kuuyee/archive/2011/03/08/345915.html</guid><wfw:comment>http://www.tkk7.com/kuuyee/comments/345915.html</wfw:comment><comments>http://www.tkk7.com/kuuyee/archive/2011/03/08/345915.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/kuuyee/comments/commentRss/345915.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/kuuyee/services/trackbacks/345915.html</trackback:ping><description><![CDATA[     鎽樿: 鏈鈥嬭繎鈥嬪噯鈥嬪鈥嬬爺鈥嬬┒鈥嬩笅鈥婼eam妗嗏嬫灦鈥嬶紝涓燴嬭鈥嬫槸鈥嬩笓鈥嬫敞鈥嬩竴鈥嬩笅鈥婮BPM闆嗏嬫垚鈥嬮儴鈥嬪垎鈥嬬殑鈥嬪唴鈥嬪鈥嬨傗嬬敱鈥嬩簬鈥婼eam鏄婮boss鐨勨嬩駭鈥嬪搧鈥嬶紝鎵鈥嬩互鈥嬪畼鈥嬫柟鈥嬫帹鈥嬭崘鈥嬩嬌鈥嬬敤鈥婮Boss搴斺嬬敤鈥嬫湇鈥嬪姟鈥嬪櫒鈥嬨傗嬩釜鈥嬩漢鈥嬭鈥嬩負鈥嬮偅鈥嬩笢鈥嬭タ鈥嬪お鈥嬪ぇ鈥嬫湁鈥?00澶氣婱B錛屾噿鈥嬪緱鈥嬩笅鈥嬭澆鈥嬶紒 鏌モ嬬湅鈥嬩簡鈥嬩笅鈥婼eam鏂団嬫。鈥嬶紝涓娾嬮潰鈥嬭鈥嬪彲鈥嬩互鈥嬩嬌鈥嬬敤鈥婽omcat+宓屸嬪叆鈥嬪紡鈥婮Boss錛岃繖鈥嬩釜鈥嬫瘮鈥嬭緝鈥嬬埥鈥嬶紝宓屸嬪叆鈥嬪紡鈥婮Boss鎵嶁?0MB銆傗嬩笅鈥嬮潰鈥嬭鈥嬪綍鈥嬩竴鈥嬩笅鈥嬮厤鈥嬬疆鈥嬭繃鈥嬬▼鈥嬨傗?<br>   <a href='http://www.tkk7.com/kuuyee/archive/2011/03/08/345915.html'>闃呰鍏ㄦ枃</a><img src ="http://www.tkk7.com/kuuyee/aggbug/345915.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/kuuyee/" target="_blank">kuuyee</a> 2011-03-08 09:19 <a href="http://www.tkk7.com/kuuyee/archive/2011/03/08/345915.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Jenkins鏂囨。緲昏瘧(1)-綆$悊http://www.tkk7.com/kuuyee/archive/2011/03/07/345864.htmlkuuyeekuuyeeMon, 07 Mar 2011 02:54:00 GMThttp://www.tkk7.com/kuuyee/archive/2011/03/07/345864.htmlhttp://www.tkk7.com/kuuyee/comments/345864.htmlhttp://www.tkk7.com/kuuyee/archive/2011/03/07/345864.html#Feedback0http://www.tkk7.com/kuuyee/comments/commentRss/345864.htmlhttp://www.tkk7.com/kuuyee/services/trackbacks/345864.htmlJenkins闇鈥嬭鈥嬩竴鈥嬩簺鈥嬬鈥嬬洏鈥嬬┖鈥嬮棿鈥嬫潵鈥嬫墽鈥嬭鈥嬫瀯鈥嬪緩鈥嬪拰鈥嬪綊鈥嬫。鈥嬨傗嬩綘鈥嬪彲鈥嬩互鈥嬪湪鈥婮enkins鐨勨嬮厤鈥嬬疆鈥嬮〉鈥嬮潰鈥嬫煡鈥嬬湅鈥嬬鈥嬬洏鈥嬫墍鈥嬪湪鈥嬬殑鈥嬭礬鈥嬪緞鈥嬨傗嬮粯鈥嬭鈥嬫儏鈥嬪喌鈥嬩笅鈥嬫槸鈥媬/.jenkins錛屼綘鈥嬪彲鈥嬩互鈥嬮氣嬭繃鈥嬪鈥嬩笅鈥嬬殑鈥嬫柟鈥嬫硶鈥嬫潵鈥嬫敼鈥嬪彉鈥嬭鈥嬬疆鈥嬶細   闃呰鍏ㄦ枃

kuuyee 2011-03-07 10:54 鍙戣〃璇勮
]]>
榪滅▼璋冭瘯Tomcat7涓嬬殑搴旂敤http://www.tkk7.com/kuuyee/archive/2010/12/03/339730.htmlkuuyeekuuyeeFri, 03 Dec 2010 09:46:00 GMThttp://www.tkk7.com/kuuyee/archive/2010/12/03/339730.htmlhttp://www.tkk7.com/kuuyee/comments/339730.htmlhttp://www.tkk7.com/kuuyee/archive/2010/12/03/339730.html#Feedback0http://www.tkk7.com/kuuyee/comments/commentRss/339730.htmlhttp://www.tkk7.com/kuuyee/services/trackbacks/339730.html 

榪滅▼璋冭瘯Tomcat7涓嬬殑搴旂敤

kuuyee  |  2010-12-03  |  Tomcat   debug  

棣栧厛鍦═omcat鐨刡in鐩綍涓嬩慨鏀筩atalina.sh,鍔犲叆JAVA_OPTS鍙傛暟:

JPDA_ADDRESS=20777 JAVA_OPTS='-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=20777'

鍏朵腑JPDA_ADDRESS瑕佹寚瀹氫竴涓病鏈夎鍗犵敤鐨勭鍙?濡傛灉涓嶆寚瀹?榛樿鍊兼槸8000

鐒跺悗鐢ㄤ笅闈㈢殑鏂瑰紡鍚姩tomcat錛?/p>

catalina.sh jpda start

鏈鍚庡惎鍔‥clipse錛岄夋嫨浣犳兂瑕丏ebug鐨勭被騫惰緗柇鐐癸紝鐒跺悗閫夋嫨Debug宸ュ叿鏍忎笅鐨凞ebug瀛愯彍鍗?Debug…)錛屽湪寮瑰嚭鐨凞ebug紿楀彛涓紝鍦ㄥ乏杈圭殑鑿滃崟欏逛腑閫夋嫨榪滅▼璋冭瘯(Remote Java Application)錛岀劧鍚庤緭鍏ユ満鍣ㄥ悕鍜岀鍙o紝姣斿璇?92.168.1.1鍜?0777錛岀劧鍚嶢pply騫朵笖寮濮婦ebug

2010-12-03

 



kuuyee 2010-12-03 17:46 鍙戣〃璇勮
]]>
JDK7 絎洓涓噷紼嬬鐗堟湰鏀懼嚭錛堣瘧錛?/title><link>http://www.tkk7.com/kuuyee/archive/2009/08/04/289693.html</link><dc:creator>kuuyee</dc:creator><author>kuuyee</author><pubDate>Mon, 03 Aug 2009 18:20:00 GMT</pubDate><guid>http://www.tkk7.com/kuuyee/archive/2009/08/04/289693.html</guid><wfw:comment>http://www.tkk7.com/kuuyee/comments/289693.html</wfw:comment><comments>http://www.tkk7.com/kuuyee/archive/2009/08/04/289693.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.tkk7.com/kuuyee/comments/commentRss/289693.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/kuuyee/services/trackbacks/289693.html</trackback:ping><description><![CDATA[鍘熸枃錛歨ttp://blogs.sun.com/mr/entry/jdk7_m4<br /> <br /> 7鏈?0鍙稴un鏀懼嚭浜咼DK7鐨勭4涓噷紼嬬鐗堟湰<a >JDK Milestone 4</a>錛孲un璁″垝鍦?010騫?鏈堟斁鍑虹8涓噷紼嬬鐗堟湰錛屽眾鏃朵篃鏄渶鍚庝竴涓噷紼嬬鐗堟湰錛屼篃灝辨槸璇存垜浠嚦灝戣鍦?010騫?鏈堝悗鎵嶈兘鐪嬪埌JDK7鐨勬渶緇堢増鏈紝鑰屼笖鍓嶆彁鏄疭un涓嶈煩紲ㄣ?br /> <br /> 鏌ョ湅璇︾粏鐨凧DK閲岀▼紕戠増鏈鍒掕鐪媓ttp://openjdk.java.net/projects/jdk7/milestones/<br /> <br /> 榪欎釜閲岀▼紕戠増鏈坊鍔犱簡濡備笅鏂扮壒鎬э細<br /> <ol> <li> 鍏煎JDK6u10鐨勬柊鐗規э細<a >Java Plug-In</a>鎶鏈紙涓昏鏄拡瀵笰pplet鐨勶級錛?a >Java Kernel</a>錛堢簿綆鐨凧RE錛変互鍙?a >Quick Starter</a>(蹇熷惎鍔紝鎹鑳芥妸鍐呭瓨浣跨敤鎺у埗鍦?0MB鍐?</li> <li> JSR 308錛?a >Annotations on Java types</a>,瀵笿ava娉ㄨВ璇硶鐨勬墿灞曪紝浣挎敞瑙h兘澶熺敤鍦↗ava綾誨瀷涓婏紝濮嬭岃兘澶熸鏌ュ悇縐嶅悇鏍風殑緙栬瘧鏃墮敊璇紙<a >compile-time error checkers</a>錛夈?/li> </ol> <br /> 璁″垝鏇存柊鐨?a >XML stack</a>騫舵病鏈夊嚭鐜板湪M4涓紝鎴戜滑鍙兘鏈熷緟M5鏉ュ厬鐜頒簡銆?br /> <br /> 瀹屾暣鐨勬洿鏂板垪琛ㄨ鐪?a >榪欓噷</a><img src ="http://www.tkk7.com/kuuyee/aggbug/289693.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/kuuyee/" target="_blank">kuuyee</a> 2009-08-04 02:20 <a href="http://www.tkk7.com/kuuyee/archive/2009/08/04/289693.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鐢╩aven-jdocbook-plugin綆鍗曢厤緗甦ocbook5.0鐜http://www.tkk7.com/kuuyee/archive/2009/07/27/288613.htmlkuuyeekuuyeeMon, 27 Jul 2009 09:24:00 GMThttp://www.tkk7.com/kuuyee/archive/2009/07/27/288613.htmlhttp://www.tkk7.com/kuuyee/comments/288613.htmlhttp://www.tkk7.com/kuuyee/archive/2009/07/27/288613.html#Feedback2http://www.tkk7.com/kuuyee/comments/commentRss/288613.htmlhttp://www.tkk7.com/kuuyee/services/trackbacks/288613.html鏂囩珷浠嬬粛5.0鐨勭紪璇戠幆澧?鐪熺殑姣旇緝綆鍗?涓嶈繃鎴戜粖澶╃湅浜嗙湅jboss seam鐨勬枃妗f瀯寤鴻繃紼?鏋勫緩鐜鎼緩鐪熸槸綆鍗曠殑涓嶈兘鍐嶇畝鍗曚簡,jboss seam浣跨敤maven鏉ュ彂甯僤ocbook鏂囨。,鐢ㄥ埌浜唌aven-jdocbook-plugin,鎴戞妸jboss seam鐨勬瀯寤烘彁鍙栧嚭鏉?澶у鍙互鍙傝冩潵鏂逛究鏋勫緩鑷繁鐨刣ocbook.

鍒涘緩涓涓渶鏈綆鍗曠殑maven絀洪」鐩?pom.xml鍐呭濡備笅:
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi
="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation
="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    
<modelVersion>4.0.0</modelVersion>
    
<groupId>org.kuuyee</groupId>
    
<artifactId>first-docbook</artifactId>
    
<packaging>jar</packaging>
    
<version>1.0-SNAPSHOT</version>
    
<name>first-docbook</name>

            
<build>
                
<plugins>
               
<!-- the docbook generation plugin for the user guide -->
                    
<plugin>
                        
<groupId>org.jboss.maven.plugins</groupId>
                        
<artifactId>maven-jdocbook-plugin</artifactId>
                        
<version>2.1.1</version>
                        
<extensions>true</extensions>
                        
<dependencies>
                            
<dependency>
                                
<groupId>org.jboss</groupId>
                                
<artifactId>jbossorg-docbook-xslt</artifactId>
                                
<version>1.1.0</version>
                            
</dependency>
                            
<dependency>
                                
<groupId>org.jboss</groupId>
                                
<artifactId>jbossorg-jdocbook-style</artifactId>
                                
<version>1.1.0</version>
                                
<type>jdocbook-style</type>
                            
</dependency>
                        
</dependencies>
                        
<executions>
                            
<execution>
                                
<id>tutorial_zh_CN</id>
                                
<phase>package</phase>
                                
<goals>
                                    
<goal>resources</goal>
                                    
<goal>generate</goal>
                                
</goals>
                                
<configuration>
                                    
<sourceDocumentName>master.xml</sourceDocumentName>
                                    
<sourceDirectory>${basedir}/src/main/docbook/zh_CN</sourceDirectory>
                                    
<imageResource>
                                        
<directory>${basedir}/src/main/docbook/images</directory>
                                    
</imageResource>
                                    
<cssResource>
                                        
<directory>${basedir}/src/main/docbook/css</directory>
                                    
</cssResource>
                                    
<targetDirectory>${basedir}/target/docbook/zh_CN</targetDirectory>

                                    
<formats>
                                        
<format>
                                            
<formatName>pdf</formatName>
                                            
<stylesheetResource>classpath:/xslt/org/jboss/pdf.xsl</stylesheetResource>
                                            
<finalName>zh_CN.pdf</finalName>
                                        
</format>
                                        
<format>
                                            
<formatName>html</formatName>
                                            
<stylesheetResource>classpath:/xslt/org/jboss/xhtml.xsl</stylesheetResource>
                                            
<finalName>index.html</finalName>
                                        
</format>
                                        
<format>
                                            
<formatName>html_single</formatName>
                                            
<stylesheetResource>classpath:/xslt/org/jboss/xhtml-single.xsl</stylesheetResource>
                                            
<finalName>index.html</finalName>
                                        
</format>
                                    
</formats>
                                    
<options>
                                        
<xincludeSupported>true</xincludeSupported>
                                    
</options>
                                
</configuration>
                            
</execution>
                        
</executions>
                    
</plugin>
                
</plugins>
            
</build>
    
    
<!-- basic JBoss repository so that the common parent POM in jbosscache-support can be found -->
    
<repositories>
        
<repository>
            
<id>snapshots.jboss.org</id>
            
<url>http://snapshots.jboss.org/maven2</url>
        
</repository>
        
<repository>
            
<id>repository.jboss.org</id>
            
<url>http://repository.jboss.org/maven2</url>
        
</repository>
    
</repositories>
</project>

鍦╯rc/main/docbook/zh_CN涓嬫柊寤轟袱涓獂ml鏂囦歡master.xml,chap1.xml.榪欓噷鐢ㄥ埌浜哾ocbook鐨勭墿鐞嗗垎鍓叉蹇?灝辨槸鎶婂崟涓枃妗f媶鍒嗘枃妗d負澶氫釜鏂囦歡,榪欏湪鏂囨。姣旇緝宸ㄥぇ鐨勬椂鍊欏緢瀹炵敤.
master.xml鏄枃妗d富鏂囦歡,鍐呭濡備笅:
<?xml version='1.0' encoding="utf-8"?>
<book xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="zh-CN" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>鍏夊瓙鐨勭涓鏈珼ocbook涔?/span></title>
<xi:include href="chap1.xml"/>
</book>

chap1.xml鏄枃妗g殑絎竴绔?鍐呭濡備笅:
<?xml version='1.0' encoding="utf-8"?>
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="zh-CN"
  xmlns:xlink
="http://www.w3.org/1999/xlink" id="ch1" xmlns:xi="http://www.w3.org/2001/XInclude">

    
<title>鍏夊瓙鐨勭涓綃嘍ocbook 5.0鏂囨。</title>
                  
  
<section>   
    
<title>絎竴绔犳爣棰?/span></title>
    
<para>
      榪欐槸鍏夊瓙鐨勭涓綃嘍ocbook 5.0鏂囨。錛屾垜鐨凚LOG
<link xlink:href='http://www.tkk7.com/kuuyee/'>鍏夊瓙CI涔嬫梾</link>銆?br />     </para>
  
</section>
</chapter>

ok,鎴戜滑鍙互鍙戝竷鏂囨。浜?娌¢敊!灝辨槸榪欎箞綆鍗?鍦ㄩ」鐩牴鐩綍榪愯鍛戒護
mvn clean package

濡傛灉澶у涓嶆槑鐧藉彲浠ヤ笅杞介檮浠舵簮鐮佺湅鐪?鏍峰紡榪樻槸浣跨敤jboss鐨?涓嶈繃鍙互鑷繁淇敼xsl!
鏍蜂緥浠g爜

璐村紶鍥劇湅鐪嬬敓鎴愮殑鏂囨。,鍛靛懙!








kuuyee 2009-07-27 17:24 鍙戣〃璇勮
]]>
maven-tomcat-plugin璇曠敤http://www.tkk7.com/kuuyee/archive/2009/07/21/287639.htmlkuuyeekuuyeeTue, 21 Jul 2009 06:13:00 GMThttp://www.tkk7.com/kuuyee/archive/2009/07/21/287639.htmlhttp://www.tkk7.com/kuuyee/comments/287639.htmlhttp://www.tkk7.com/kuuyee/archive/2009/07/21/287639.html#Feedback0http://www.tkk7.com/kuuyee/comments/commentRss/287639.htmlhttp://www.tkk7.com/kuuyee/services/trackbacks/287639.html
<properties>
    
<!-- Cargo settings -->
    
<cargo.container.manager.url>http://192.168.1.107/manager</cargo.container.manager.url>
    
<cargo.container.username>admin</cargo.container.username>
    
<cargo.container.password>123456</cargo.container.password>
    
<cargo.wait>false</cargo.wait>
</properties>
<build>
    
<plugins>
        
<plugin>
            
<groupId>org.codehaus.mojo</groupId>
            
<artifactId>tomcat-maven-plugin</artifactId>
            
<version>1.0-beta-1</version>
            
<configuration>
                
<path>/runes</path>
                
<url>${cargo.container.manager.url}</url>
                
<username>${cargo.container.username}</username>
                
<password>${cargo.container.password}</password>
                
<warDirectory>${basedir}/src/main/webapp</warDirectory>
            
</configuration>
            
<executions>
                
<execution>
                    
<id>tomcat-deploy</id>
                    
<phase>deploy</phase>
                    
<goals>
                        
<goal>deploy</goal>
                    
</goals>
                
</execution>
                
<!--execution>
                                <id>undeploy</id>
                                <phase>deploy</phase>
                                <goals>
                                    <goal>start</goal>
                                </goals>
                            </execution
-->
            
</executions>
        
</plugin>
    
</plugins>
</build>
maven-tomcat-plugin閫氳繃tomcat鐨刴anager鎺у埗鍙版潵deploy鎴杣ndeploy搴旂敤,鎵浠ヨ鎶婁綘鐨則omcat鐨勭浉鍏充俊鎭厤緗笂,鍖呮嫭manager url,鐢ㄦ埛鍚嶅強瀵嗙爜絳?

kuuyee 2009-07-21 14:13 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 国产99久久久国产精免费| 亚洲欧洲国产综合AV无码久久| 亚洲视频在线观看免费| 亚洲经典在线中文字幕| 亚洲色精品三区二区一区| 国产成人高清亚洲一区91| 伊人免费在线观看高清版| 3d成人免费动漫在线观看| 青青草国产免费久久久91| 国产亚洲情侣一区二区无| 久久久亚洲AV波多野结衣| 亚洲最大的黄色网| 一进一出60分钟免费视频| 久草视频在线免费看| 国产成人A在线观看视频免费| 免费jjzz在在线播放国产| 亚洲国产精品无码久久一线| 亚洲人成影院77777| 无码的免费不卡毛片视频| 四虎国产成人永久精品免费| 好男人看视频免费2019中文| 亚洲人成亚洲人成在线观看 | 亚洲精品国产自在久久| 亚洲一二成人精品区| 亚洲国产成人久久精品大牛影视 | 亚洲国产成人久久综合区| 亚洲国产成人久久综合碰碰动漫3d| 亚洲中文字幕乱码熟女在线| 一出一进一爽一粗一大视频免费的| 亚洲高清免费在线观看| 亚洲国产黄在线观看| 亚洲精品中文字幕麻豆| 尤物视频在线免费观看| 在线观看永久免费| 亚洲AⅤ视频一区二区三区| 亚洲精品美女视频| 91av免费在线视频| 夜夜爽免费888视频| 亚洲AV日韩精品久久久久久久| 国产亚洲午夜精品| 亚洲视频免费在线播放|