12 2010 档案

存储过程导出sqlServer数据脚本
摘要:[代码]调用存储过程[代码]再全选‘结果’并保存为.sql脚本文件即可:代码 阅读全文

posted @ 2010-12-27 16:48 archie2010 阅读(708) 评论(0) 推荐(0) 编辑

JSTL fmt:formatNumber日期、 数字、货币格式化
摘要:使用fmt标签应先导入[代码]其uri可在fmt.tld文件下1. 日期格式化[代码]value:要格式化的日期pattern:日期格式化的格式[代码]java格式化输出:DecimalFormat df = new DecimalFormat("格式");String fmt =df.format(double);符号 意义0 一个数位# 一个数位,前导零和追尾零不显示. 小数点分割位置, 组分隔符的位置- 负数前缀% 用100乘,并显示百分号其他任何符号 在输出字符串中包括指定符号 阅读全文

posted @ 2010-12-17 17:51 archie2010 阅读(1381) 评论(0) 推荐(0) 编辑

Java数字、货币格式化
摘要:[代码]DecimalFormatimportjava.text.DecimalFormat;publicclassTestNumberFormat{publicstaticvoidmain(String[]args){doublepi=3.1415927;//圆周率//取一位整数System.out.println(newDecimalFormat("0").format(pi));//3//取一位整数和两位小数System.out.println(newDecimalFormat("0.00").format(pi));//3.14//取两位整数和三位小数,整数不足部分以0填补。Syste 阅读全文

posted @ 2010-12-17 17:34 archie2010 阅读(1372) 评论(0) 推荐(1) 编辑

Ibatis的resultMap与resultClass
摘要:1、resultMap属于直接映射,可以把结果集中的数据库字段与实体类中的属性一一对应,这样通过select语句得到的结果就会准确的对上号 2、resultclass属于隐身映射,虽然你指定resultclass=“”,具体某一个类,但是select语句得到的结果是一条实力记录,但如果数据库字段与类的属性名字不一致,这个时候就会出现映射错误,有一种方式可以解决就是在写select语句时,给每个字段用as运算符取名字与属性一样:例如:select realname as name...其中realname是字段列名,name是属性字段名3、resultmap比resultclass性能要高。尽量 阅读全文

posted @ 2010-12-17 15:22 archie2010 阅读(1083) 评论(0) 推荐(0) 编辑

java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0).
摘要:--- The error occurred in sqlMap/adInfo.xml. --- The error occurred while applying a parameter map. --- Check the insertAdInfo-InlineParameterMap. --- Check the parameter mapping for the 'clicks' property. --- Cause: java.sql.SQLException: Parameter index out of range (1 number of parameters, whic 阅读全文

posted @ 2010-12-17 14:27 archie2010 阅读(7508) 评论(0) 推荐(0) 编辑

springMVC入门配置
摘要:DispatcherServletweb.xml[代码]springapp-servlet.xml[代码]Product.java[代码]ProductManager.java[代码]代码InventoryController.java[代码] 阅读全文

posted @ 2010-12-13 18:33 archie2010 阅读(11083) 评论(0) 推荐(1) 编辑

ibatis模糊查询
摘要:Person.xml[代码]PersonDao.java[代码] 阅读全文

posted @ 2010-12-10 08:14 archie2010 阅读(6276) 评论(0) 推荐(0) 编辑

Error setting properties of-ibatis-数据库不能为NULL
摘要:com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred in sqlMap/google_campaigns.xml. --- The error occurred while applying a result map. --- Check the googleCampaigns.googleCampaignsResult. --- The error happened while setting a property on the result object. --- Cause: com.ib 阅读全文

posted @ 2010-12-09 09:19 archie2010 阅读(782) 评论(0) 推荐(0) 编辑

Struts2自定义拦截器
摘要:LoginInterceptor.javaCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->package com.tq365.util;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpSession;import org.apache.struts2.ServletActionContext;import com.opensymphony.x 阅读全文

posted @ 2010-12-08 08:16 archie2010 阅读(630) 评论(0) 推荐(0) 编辑

ibatis缓存配置
摘要:sql配文件中的缓存配置Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><cacheModel id="user-cache" type="LRU"><flushInterval hours="24"/><flushOnExecute statement="insertUser"/><flushOnExecute stat 阅读全文

posted @ 2010-12-06 17:34 archie2010 阅读(828) 评论(0) 推荐(0) 编辑

绝对路径${pageContext.request.contextPath}
摘要:------------------------用urlrewrite改写url------------------------------登录后第一次点击正确,鼠标放在链接上,出现正确url--------------http://localhost:8080/ibatisORM/listuser/2但点击之后,链接会变成http://localhost:8080/ibatisORM/listuser/listuser/2加上绝对路径${pageContext.request.contextPath}----a href="${pageContext.request.contextPath 阅读全文

posted @ 2010-12-02 11:07 archie2010 阅读(2484) 评论(0) 推荐(0) 编辑

Google账户结构
摘要: 阅读全文

posted @ 2010-12-01 15:29 archie2010 阅读(306) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示