- 博客(5)
- 收藏
- 关注
原创 ibatis中使用缓存
简单在ibatis中使用cache 首先设置SqlMapConfig.xml中settings/>节点的属性cacheModelsEnabled="true" 然后在具体sqlmap文件中书写cacheModel> cacheModel id="product-cache" type="LRU"> flushInterval hours="24"/> fl
2008-01-25 11:31:00 441
原创 在ibatis 拼接sql语句,动态查询
在ibatis中使用安全的拼接语句,动态查询ibatis比JDBC的优势之一,安全高效说明文字在注释中 select id="selectAllProducts" parameterClass="Product" resultMap="ProductResult"> select id,note from Product dynamic prepend="WHERE">
2008-01-25 11:29:00 2426
原创 ibatis配置多表关联(一对一、一对多、多对多)
iBatis的多表关联。ibatis的表关联,和数据库语句无关,是在程序中,把若干语句的结果关联到一起。这种关联形式,虽然在大数据量时是很奢侈的行为,但是看起来很干净,用起来也很方便。这里用表lock和key为例,一个lock可以配多个key。 CREATE TABLE lock( id int, lockName varchar);CREATE TABLE key(
2008-01-25 11:23:00 6589 4
原创 C#过滤所有HTML代码的函数
过滤掉 html代码#region 过滤掉 html代码 public static string StripHTML(string strHtml) ...{ string [] aryReg =...{ @"]*?>.*?", @"", @"([ ])[s]+", @"&(quot|#34);", @"&(amp|#38);", @"&(lt|#60);", @"&(gt|#62);",
2008-01-18 11:53:00 606
原创 Asp.net里面的发送邮件
一、首先需要配置web.config文件:system.net> mailSettings> smtp from="Emailname"> network host="smtp.163.com" userName="Emailname" password="Emailpassword" port="25" defaultCredentials="fal
2008-01-18 11:51:00 584
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人