📄 ibatis开发人员指南(翻译自ibatis_db_guide-1-2-8)3.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0058)http://champion.ewuxi.com/old/opensource/ibatis/guide3.htm -->
<HTML><HEAD><TITLE>蓝色天空(原创作品)</TITLE><!-- InstanceBegin template="/Templates/文章.dwt" codeOutsideHTMLIsLocked="false" --><!-- InstanceBeginEditable name="doctitle" --><!-- InstanceEndEditable -->
<META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK
href="ibatis开发人员指南(翻译自ibatis_db_guide-1-2-8)3_files/FORUM.css" type=text/css
rel=stylesheet><!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable --><!-- InstanceParam name="OptionalRegion1" type="boolean" value="true" -->
<META content="MSHTML 6.00.3790.0" name=GENERATOR></HEAD>
<BODY lang=ZH-CN style="TEXT-JUSTIFY-TRIM: punctuation; tab-interval: 21.0pt"
bgColor=#adced8>
<H4
align=center><!-- InstanceBeginEditable name="标题" -->ibatis开发人员指南(翻译自ibatis_db_guide-1-2-8)(3)<!-- InstanceEndEditable --></H4><!-- InstanceBeginEditable name="EditRegion3" -->
<P><STRONG>The SQL Map XML Configuration
File<BR>(http://www.ibatis.com/dtd/sql-map-config.dtd)</STRONG></P>
<P>SQL Map是一个核心的XML文件来配置的。这个文件包含了配置的细节和DataSources(数据源),Sql
Map和其他选项,比如线程管理。以下是一个SqlMap的配置文件</P>
<TABLE width="100%" bgColor=#cccccc border=1>
<TBODY>
<TR>
<TD class=smallFont>
<P><!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Author>champion</o:Author> <o:LastAuthor>champion</o:LastAuthor> <o:Revision>1</o:Revision> <o:TotalTime>10</o:TotalTime> <o:Created>2003-12-04T09:28:00Z</o:Created> <o:LastSaved>2003-12-04T09:38:00Z</o:LastSaved> <o:Pages>1</o:Pages> <o:Company>sta</o:Company> <o:Lines>1</o:Lines> <o:Paragraphs>1</o:Paragraphs> <o:Version>9.2812</o:Version> </o:DocumentProperties></xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:AttachedTemplate HRef="C:\Documents and Settings\champion.CHAMPION\Application Data\Microsoft\Templates\Normal.dot"></w:AttachedTemplate> <w:PunctuationKerning/> <w:DrawingGridVerticalSpacing>7.8 磅</w:DrawingGridVerticalSpacing> <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery> <w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery> <w:Compatibility> <w:SpaceForUL/> <w:BalanceSingleByteDoubleByteWidth/> <w:DoNotLeaveBackslashAlone/> <w:ULTrailSpace/> <w:DoNotExpandShiftReturn/> <w:AdjustLineHeightInTable/> <w:UseFELayout/> </w:Compatibility> </w:WordDocument></xml><![endif]-->
<DIV class=Section1>
<P class=MsoNormal><B><I><SPAN lang=EN-US
style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><?xml
version="1.0" encoding="UTF-8"?><O:P></O:P></SPAN></I></B></P>
<P class=MsoNormal><B><I><SPAN lang=EN-US
style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><SPAN
style="mso-spacerun: yes"> </SPAN><!DOCTYPE
sql-map-config PUBLIC "-//iBATIS.com//DTD SQL Map Config 1.0//EN"
<O:P></O:P></SPAN></I></B></P>
<P class=MsoNormal><B><I><SPAN lang=EN-US
style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><SPAN
style="mso-spacerun: yes">
</SPAN>"http://www.ibatis.com/dtd/sql-map-config.dtd"><O:P></O:P></SPAN></I></B></P>
<P class=MsoNormal><B><I><SPAN lang=EN-US
style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><SPAN
style="mso-tab-count: 2">
</SPAN><O:P></O:P></SPAN></I></B></P>
<P class=MsoNormal><B><I><SPAN lang=EN-US
style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><SPAN
style="mso-spacerun: yes"> </SPAN><!-- Always ensure
to use the correct XML header as above!
--><O:P></O:P></SPAN></I></B></P>
<P class=MsoNormal><B><I><SPAN lang=EN-US
style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><SPAN
style="mso-spacerun: yes">
</SPAN><sql-map-config><O:P></O:P></SPAN></I></B></P>
<P class=MsoNormal><B><I><SPAN lang=EN-US
style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><SPAN
style="mso-tab-count: 1">
</SPAN><O:P></O:P></SPAN></I></B></P>
<P class=MsoNormal><B><I><SPAN lang=EN-US
style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><SPAN
style="mso-spacerun: yes"> </SPAN><!--
The properties (name=value) in the file specified here can be used
placeholders in this config<O:P></O:P></SPAN></I></B></P>
<P class=MsoNormal><B><I><SPAN lang=EN-US
style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><SPAN
style="mso-spacerun: yes"> </SPAN>file (e.g.
"${driver}". The file is relative to the classpath and is completely
optional. --><O:P></O:P></SPAN></I></B></P>
<P class=MsoNormal><B><I><SPAN lang=EN-US
style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><SPAN
style="mso-spacerun: yes">
</SPAN><properties
resource="examples/sqlmap/maps/SqlMapConfigExample.properties"
/><O:P></O:P></SPAN></I></B></P>
<P class=MsoNormal><B><I><SPAN lang=EN-US
style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><SPAN
style="mso-tab-count: 1">
</SPAN><SPAN style="mso-spacerun: yes">
</SPAN><O:P></O:P></SPAN></I></B></P>
<P class=MsoNormal><B><I><SPAN lang=EN-US
style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><SPAN
style="mso-spacerun: yes"> </SPAN><!--
These settings control SqlMap configuration details, primarily to do with
transaction<O:P></O:P></SPAN></I></B></P>
<P class=MsoNormal><B><I><SPAN lang=EN-US
style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><SPAN
style="mso-spacerun: yes">
</SPAN>management. They are all optional (more detail later in this
document). --><O:P></O:P></SPAN></I></B></P>
<P class=MsoNormal><B><I><SPAN lang=EN-US
style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><SPAN
style="mso-spacerun: yes">
</SPAN><settings maxExecute="300"<O:P></O:P></SPAN></I></B></P>
<P class=MsoNormal><B><I><SPAN lang=EN-US
style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><SPAN
style="mso-spacerun: yes">
</SPAN>maxExecutePerConnection="1"<O:P></O:P></SPAN></I></B></P>
<P class=MsoNormal><B><I><SPAN lang=EN-US
style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><SPAN
style="mso-spacerun: yes">
</SPAN>maxTransactions="10"<O:P></O:P></SPAN></I></B></P>
<P class=MsoNormal><B><I><SPAN lang=EN-US
style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><SPAN
style="mso-spacerun: yes">
</SPAN>statementCacheSize="75"<O:P></O:P></SPAN></I></B></P>
<P class=MsoNormal><B><I><SPAN lang=EN-US
style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><SPAN
style="mso-spacerun: yes">
</SPAN>useGlobalTransactions="false"<O:P></O:P></SPAN></I></B></P>
<P class=MsoNormal><B><I><SPAN lang=EN-US
style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><SPAN
style="mso-spacerun: yes">
</SPAN>useBeansMetaClasses="true" /><O:P></O:P></SPAN></I></B></P>
<P class=MsoNormal><B><I><SPAN lang=EN-US
style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><SPAN
style="mso-tab-count: 2">
</SPAN><SPAN style="mso-spacerun: yes">
</SPAN><O:P></O:P></SPAN></I></B></P>
<P class=MsoNormal><B><I><SPAN lang=EN-US
style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><SPAN
style="mso-spacerun: yes"> </SPAN><!--
Configure a datasource to use with this SQL Map using Jakarta
DBCP<O:P></O:P></SPAN></I></B></P>
<P class=MsoNormal><B><I><SPAN lang=EN-US
style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><SPAN
style="mso-spacerun: yes"> </SPAN>notice the
use of the properties from the above resource
--><O:P></O:P></SPAN></I></B></P>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -