亚洲免费在线-亚洲免费在线播放-亚洲免费在线观看-亚洲免费在线观看视频-亚洲免费在线看-亚洲免费在线视频

spring frame 事務回滾的測試

系統 1567 0

?我的環境配置
Mysql :server version: 5.0.45-Debian_1ubuntu3.1-log Debian etch distribution
Spring frame: 2.0
jdk 1.6
數據庫的配置:

-- ?MySQL?Administrator?dump?1.4
--
--
?------------------------------------------------------
--
?Server?version????5.0.45-Debian_1ubuntu3.1-log


/**/ /* !40101?SET?@OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT? */ ;
/**/ /* !40101?SET?@OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS? */ ;
/**/ /* !40101?SET?@OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION? */ ;
/**/ /* !40101?SET?NAMES?utf8? */ ;

/**/ /* !40014?SET?@OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS,?UNIQUE_CHECKS=0? */ ;
/**/ /* !40014?SET?@OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS,?FOREIGN_KEY_CHECKS=0? */ ;
/**/ /* !40101?SET?@OLD_SQL_MODE=@@SQL_MODE,?SQL_MODE='NO_AUTO_VALUE_ON_ZERO'? */ ;


--
--
?Create?schema?SQLMapStudy
--

CREATE ? DATABASE ? IF ? NOT ? EXISTS ?SQLMapStudy;
USE ?SQLMapStudy;

--
--
?Definition?of?table?`SQLMapStudy`.`ORDER`
--

DROP ? TABLE ? IF ? EXISTS ?`SQLMapStudy`.` ORDER `;
CREATE ? TABLE ??`SQLMapStudy`.` ORDER `?(
??`id`?
int ( 11 )? NOT ? NULL ?auto_increment,
??`
level `? int ( 11 )? default ? ' 0 ' ,
??`name`?
text ,
??
PRIMARY ? KEY ??(`id`)
)?ENGINE
= InnoDB?AUTO_INCREMENT = 42 ? DEFAULT ?CHARSET = latin1;

--
--
?Dumping?data?for?table?`SQLMapStudy`.`ORDER`
--

/**/ /* !40000?ALTER?TABLE?`ORDER`?DISABLE?KEYS? */ ;
LOCK?TABLES?`
ORDER `?WRITE;
INSERT ? INTO ?`SQLMapStudy`.` ORDER `? VALUES ??( 24 , 5 , ' 233571 ' ),
?(
25 , 3 , ' 237607 ' ),
?(
26 , 4 , ' 951320 ' ),
?(
27 , 4 , ' 3981449 ' ),
?(
28 , 3 , ' 4201861 ' ),
?(
29 , 3 , ' 4286204 ' ),
?(
30 , 4 , ' 4467730 ' ),
?(
31 , 4 , ' 4577921 ' ),
?(
32 , 4 , ' 4644267 ' ),
?(
33 , 4 , ' 4676767 ' ),
?(
34 , 4 , ' 8718591 ' ),
?(
35 , 4 , ' 1200488898355 ' ),
?(
36 , 3 , ' 1200489291189 ' ),
?(
37 , 3 , ' 1200489506119 ' ),
?(
38 , 3 , ' 1200490058635 ' ),
?(
41 , 4 , ' 1200490554236 ' );
UNLOCK?TABLES;
/**/ /* !40000?ALTER?TABLE?`ORDER`?ENABLE?KEYS? */ ;




/**/ /* !40101?SET?SQL_MODE=@OLD_SQL_MODE? */ ;
/**/ /* !40014?SET?FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS? */ ;
/**/ /* !40014?SET?UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS? */ ;
/**/ /* !40101?SET?CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT? */ ;
/**/ /* !40101?SET?CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS? */ ;
/**/ /* !40101?SET?COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION? */ ;
/**/ /* !40101?SET?CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT? */ ;

要注意的問題:ENGINE=InnoDB

數據庫映射對象類Order

/**/ /*
?*?Copyright?(C)?2000-2007?Wang?Pengcheng?<wpc0000@gmail.com>
?*?Licensed?to?the?Wang?Pengcheng?under?one?or?more
?*?contributor?license?agreements.??See?the?NOTICE?file?distributed?with
?*?this?work?for?additional?information?regarding?copyright?ownership.
?*?The?LGPL?licenses?this?file?to?You?under?the?GNU?Lesser?General?Public
?*?Licence,?Version?2.0??(the?"License");?you?may?not?use?this?file?except?in
?*?compliance?with?the?License.??You?may?obtain?a?copy?of?the?License?at
?*
?*?????
http://www.gnu.org/licenses/lgpl.txt
?*
?*?Unless?required?by?applicable?law?or?agreed?to?in?writing,?software
?*?distributed?under?the?License?is?distributed?on?an?"AS?IS"?BASIS,
?*?WITHOUT?WARRANTIES?OR?CONDITIONS?OF?ANY?KIND,?either?express?or?implied.
?*?See?the?License?for?the?specific?language?governing?permissions?and
?*?limitations?under?the?License.
?
*/

// Edit?15?Jan?2008
package ?com.studyspring.ch5;

public ? class ?Order? ... {
????
private ? int ?id;
????
private ? int ?level;
????
private ?String?name;
????
public ? int ?getId()? ... {
????????
return ?id;
????}

????
public ? void ?setId( int ?id)? ... {
????????
this .id? = ?id;
????}

????
public ? int ?getLevel()? ... {
????????
return ?level;
????}

????
public ? void ?setLevel( int ?level)? ... {
????????
this .level? = ?level;
????}

????
public ?String?getName()? ... {
????????
return ?name;
????}

????
public ? void ?setName(String?name)? ... {
????????
this .name? = ?name;
????}

????
}

實現RowMapper:

/**/ /*
?*?Copyright?(C)?2000-2007?Wang?Pengcheng?<wpc0000@gmail.com>
?*?Licensed?to?the?Wang?Pengcheng?under?one?or?more
?*?contributor?license?agreements.??See?the?NOTICE?file?distributed?with
?*?this?work?for?additional?information?regarding?copyright?ownership.
?*?The?LGPL?licenses?this?file?to?You?under?the?GNU?Lesser?General?Public
?*?Licence,?Version?2.0??(the?"License");?you?may?not?use?this?file?except?in
?*?compliance?with?the?License.??You?may?obtain?a?copy?of?the?License?at
?*
?*?????
http://www.gnu.org/licenses/lgpl.txt
?*
?*?Unless?required?by?applicable?law?or?agreed?to?in?writing,?software
?*?distributed?under?the?License?is?distributed?on?an?"AS?IS"?BASIS,
?*?WITHOUT?WARRANTIES?OR?CONDITIONS?OF?ANY?KIND,?either?express?or?implied.
?*?See?the?License?for?the?specific?language?governing?permissions?and
?*?limitations?under?the?License.
?
*/

// Edit?15?Jan?2008
package ?com.studyspring.ch5;

import ?java.sql.ResultSet;
import ?java.sql.SQLException;

import ?org.springframework.jdbc.core.RowMapper;

public ? class ?OrderRowMapper? implements ?RowMapper? ... {

spring frame 事務回滾的測試


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 国产亚洲精品久久久久久小说 | 欧美αv在线 | 亚洲精品国产精品国自产观看 | 国产精品久久久久久麻豆一区 | 99在线观看精品 | 九九久久国产精品免费热6 九九久久精品 | 国产精品伦理一区二区三区 | 国产精品福利视频免费观看 | 久久久久久免费精品视频 | 久草青青在线 | 五月花在线观看播放视频 | 欧美日韩不卡码一区二区三区 | 日本囗交做爰视频欧美 | 国产精品揄拍一区二区久久 | 婷婷亚洲综合一区二区 | 国产欧美日韩综合一区二区三区 | 亚洲国产成人超福利久久精品 | 国产亚洲一欧美一区二区三区 | 日日摸夜夜爽人人添 | 中文字幕在线观看不卡 | 免费区欧美一级毛片精品 | 日韩亚洲人成在线综合 | 久久aa毛片免费播放嗯啊 | 欧美成人免费观看久久 | www.香蕉视频 | 久久综合九色综合狠狠97 | 亚洲在线一区 | 亚洲国产系列一区二区三区 | 中文字幕亚洲综合久久 | 久久国产乱子伦精品免 | 2020年国产高中毛片在线视频 | 免费的拍拍视频在线观看 | 国产品精人成福利视频 | 亚洲精品高清国产麻豆专区 | 久久精品a | 日本aaaa特级毛片 | 日本手机在线视频 | 国语一区| 人人干人人舔 | 中文一区二区视频 | 国产精品国产 |