锘??xml version="1.0" encoding="utf-8" standalone="yes"?>在线观看视频一区二区三区,亚洲精品在线看,国产香蕉视频在线观看http://www.aygfsteel.com/Reg/category/45430.htmlzh-cnTue, 05 Apr 2011 20:33:01 GMTTue, 05 Apr 2011 20:33:01 GMT60a different object with the same identifier value was already associated with the sessionhttp://www.aygfsteel.com/Reg/archive/2011/04/05/347655.html鑹炬嘗鑹炬嘗Tue, 05 Apr 2011 14:26:00 GMThttp://www.aygfsteel.com/Reg/archive/2011/04/05/347655.htmlhttp://www.aygfsteel.com/Reg/comments/347655.htmlhttp://www.aygfsteel.com/Reg/archive/2011/04/05/347655.html#Feedback0http://www.aygfsteel.com/Reg/comments/commentRss/347655.htmlhttp://www.aygfsteel.com/Reg/services/trackbacks/347655.html榪欎釜閿欒鎴戜竴鍏遍亣鍒拌繃涓ゆ錛屼竴鐩存病鏈夋壘鍒板緢濂界殑瑙e喅鏂規錛岃繖涓敊璇駭鐢熷師鍥犵浉淇″ぇ瀹墮兘鐭ラ亾錛屽洜涓哄湪hibernate涓悓涓涓猻ession閲岄潰鏈変簡涓や釜鐩稿悓鏍囪瘑浣嗘槸鏄笉鍚屽疄浣?
涓寮濮嬫寜緗戜笂璇寸殑鐢╯ession.merge(Object)鎶ヤ簡涓涓敊錛屽彲鑳芥槸娌℃湁鐢ㄥソ錛屾敼鐢?nbsp;session.clear(); session.update(user);榪欐牱灝監K浜?
鏂規硶涓猴細

package org.springframework.orm.hibernate3.support;

    
public void modifyByMerge(User user) {
        Session session 
= getHibernateTemplate().getSessionFactory().
                          getCurrentSession();
        session.clear();
        session.update(user);
    }

欏圭洰鐢ㄧ殑鏄痵pring 
+ hibernate鎵浠ュ緱鐢╣etHibernateTemplate().getSessionFactory().getCurrentSession();寰楀綋鍓峉ession



鑹炬嘗 2011-04-05 22:26 鍙戣〃璇勮
]]>
Struts2涓嶉厤緗畆esult鍙傛暟 榪涜璺寵漿瀹炵幇http://www.aygfsteel.com/Reg/archive/2010/11/20/338553.html鑹炬嘗鑹炬嘗Sat, 20 Nov 2010 08:53:00 GMThttp://www.aygfsteel.com/Reg/archive/2010/11/20/338553.htmlhttp://www.aygfsteel.com/Reg/comments/338553.htmlhttp://www.aygfsteel.com/Reg/archive/2010/11/20/338553.html#Feedback0http://www.aygfsteel.com/Reg/comments/commentRss/338553.htmlhttp://www.aygfsteel.com/Reg/services/trackbacks/338553.html//url緇濆璺緞
 this.getRequest().getRequestDispatcher("url").forward(this.getRequest(),this.getResponse());
    
return NONE;

鑹炬嘗 2010-11-20 16:53 鍙戣〃璇勮
]]>
Hibernate鎵歸噺鎻愪氦http://www.aygfsteel.com/Reg/archive/2010/07/30/327589.html鑹炬嘗鑹炬嘗Fri, 30 Jul 2010 09:17:00 GMThttp://www.aygfsteel.com/Reg/archive/2010/07/30/327589.htmlhttp://www.aygfsteel.com/Reg/comments/327589.htmlhttp://www.aygfsteel.com/Reg/archive/2010/07/30/327589.html#Feedback0http://www.aygfsteel.com/Reg/comments/commentRss/327589.htmlhttp://www.aygfsteel.com/Reg/services/trackbacks/327589.html鎵歸噺鎻掑叆錛圔atch inserts錛?nbsp;
濡傛灉瑕佸皢寰堝瀵硅薄鎸佷箙鍖栵紝浣犲繀欏婚氳繃緇忓父鐨勮皟鐢?nbsp;flush() 浠ュ強紼嶅悗璋冪敤 clear() 鏉ユ帶鍒剁涓綰х紦瀛樼殑澶у皬銆?nbsp;

Session session 
= sessionFactory.openSession(); 
Transaction tx 
= session.beginTransaction(); 
   
for ( int i=0; i<100000; i++ ) { 
    Customer customer 
= new Customer(..); 
    session.save(customer); 
    
if ( i % 20 == 0 ) { //20, same as the JDBC batch size //20,涓嶫DBC鎵歸噺璁劇疆鐩稿悓 
        
//flush a batch of inserts and release memory: 
        
//灝嗘湰鎵規彃鍏ョ殑瀵硅薄绔嬪嵆鍐欏叆鏁版嵁搴撳茍閲婃斁鍐呭瓨 
        session.flush(); 
        session.clear(); 
    } 

   
tx.commit(); 
session.close(); 



鑹炬嘗 2010-07-30 17:17 鍙戣〃璇勮
]]>
struts2鐨剆錛歩terator 鏍囩 璇﹁Вhttp://www.aygfsteel.com/Reg/archive/2009/11/20/303085.html鑹炬嘗鑹炬嘗Fri, 20 Nov 2009 09:56:00 GMThttp://www.aygfsteel.com/Reg/archive/2009/11/20/303085.htmlhttp://www.aygfsteel.com/Reg/comments/303085.htmlhttp://www.aygfsteel.com/Reg/archive/2009/11/20/303085.html#Feedback0http://www.aygfsteel.com/Reg/comments/commentRss/303085.htmlhttp://www.aygfsteel.com/Reg/services/trackbacks/303085.html
struts2鐨剆錛歩terator 鍙互閬嶅巻 鏁版嵁鏍堥噷闈㈢殑浠諱綍鏁扮粍錛岄泦鍚堢瓑絳?浠ヤ笅鍑犱釜綆鍗曠殑demo錛?br /> s:iterator 鏍囩鏈?涓睘鎬э細
    value錛氳榪唬鐨勯泦鍚?br />     id   錛氭寚瀹氶泦鍚堥噷闈㈢殑鍏冪礌鐨刬d
    status 榪唬鍏冪礌鐨勭儲寮?/div>
1:jsp欏甸潰瀹氫箟鍏冪礌鍐欐硶 鏁扮粍鎴杔ist

<s:iterator value="{'1','2','3','4','5'}" id='number'>
    <s:property value='number'/>A
</s:iterator>
鎵撳嵃緇撴灉涓? 1A2A3A4A5A
2:绱㈠紩鐨勭敤娉?br /> 濡傛灉鎸囧畾浜唖tatus錛屾瘡嬈$殑榪唬鏁版嵁閮芥湁IteratorStatus鐨勫疄渚嬶紝瀹冩湁浠ヤ笅鍑犱釜鏂規硶
int getCount()榪斿洖褰撳墠榪唬浜嗗嚑涓厓绱?br /> int getIndex()榪斿洖褰撳墠鍏冪礌绱㈠紩
boolean isEven()褰撶劧鐨勭儲寮曟槸鍚﹀伓鏁?br /> boolean isFirst()褰撳墠鏄惁絎竴涓厓绱?br /> boolean isLast()
boolean isOdd()褰撳墠鍏冪礌绱㈠紩鏄惁濂囨暟
<s:iterator value="{'a','b','c'}" id='char' status='st'>
    <s:if test="#st.Even">
        鐜板湪鐨勭儲寮曟槸濂囨暟涓?<s:property value='#st.index'/>
    </s:if>
    褰撳墠鍏冪礌鍊鹼細<s:property value='char'/>
</s:iterator>
3錛氶亶鍘唌ap
value鍙互鐩存帴瀹氫箟涓猴細
value="#{"1":"a","2":"b"}"
姣忎釜鍏冪礌浠ラ兘濂介殧寮銆傚厓绱犱箣闂寸殑key鍜寁alue 鍐掑彿闅斿紑
value涔熷彲浠ユ槸鏁版嵁鏍堥噷闈㈢殑java.util.Map瀵硅薄
閬嶅巻鍐欐硶濡備笅錛?/div>
<s:iterator value="map" id="id" status="st">
     key : <s:property value='key'/>
     value:<s:property vlaue='value'/>
</s:iterator>
褰撶劧key 鍜寁alue 閮藉彲浠ヤ嬌java 鐨?Object
3錛氶亶鍘嗘暟鎹爤.綆鍗曠殑List綾伙紝
List<Attr>
class Attr{String attrName;String getAttrName(){return "123";}}
<s:iterator value="label" id="id">
    <s:property value="#id.attrName" />
</s:iterator>
褰撶劧value 榪樺彲浠ュ啓鎴?value="%{label}" label鍙互鏈?鎿嶄綔
label鐨勫睘鎬ist 鍙互鍐欐垚value="%{label.list}" 鐩稿綋浜庯細getLabel().getList();
4錛氶亶鍘?涓猯ist錛?br /> List<AttrName> attrN {color,size,style}
List<AttrValue> attrV {red,20,gay}
榪?涓猯ist鐨勫厓绱犳槸涓涓瀵瑰簲鐨勶紝涓涓猘ttrN瀵瑰簲涓涓猘ttrV
<s:iterator value="%{attrN }" id="id"   status="status">
index    is : <s:property value='status.index'/>
attrName is : <s:property value='id'/> or <s:property value='%{id}'/>
attrName is : <s:property value='%{attrV[#status.index]}'/>
</s:iterator>  


鑹炬嘗 2009-11-20 17:56 鍙戣〃璇勮
]]> 主站蜘蛛池模板: 卓尼县| 沅陵县| 土默特右旗| 洪洞县| 喀什市| 洛阳市| 乌拉特中旗| 凤翔县| 广安市| 晋中市| 江源县| 漳州市| 都匀市| 都江堰市| 探索| 迭部县| 晴隆县| 康马县| 化州市| 黎川县| 桐庐县| 深泽县| 麻栗坡县| 新津县| 德化县| 武安市| 安岳县| 福清市| 洛隆县| 巢湖市| 盐津县| 康平县| 徐闻县| 班玛县| 乌审旗| 聊城市| 巴中市| 个旧市| 波密县| 通化县| 阳曲县|