开发中常见小问题(笔记)

1.mybatis在xml文件中处理大于号小于号的方法:”<”号用 “&lt;” 代替;
或者用 <![CDATA[ when min(starttime)<='12:00' and max(endtime)<='12:00' ]]>

insert into question values('001','我是一条记录&nbsp;你也是一条记录');

执行语句时发现叫你输入 nbsp;的值,原因是因为 plsql把 &作为一个变量的开头,所以每次执行这条语句时会提醒你,解决方法:只要把 define 的属性设置为: off 就可以了(set define off);这样就可以插入象&nbsp;&lt;&gt; 这样的特殊字符了。

2.金额字段采用BigDecimal,数据中用number(12,6);

3.后台用hibernate的hql语句查询的对象集合(如:List)不能用遍历,可以用struts2的标签来遍历。
后台代码:

List<FdInInvoice> invoiceList = projectService.getInvoiceListByPrjCode(prjCode);//hibernate 查询
Struts2Utils.getRequest().setAttribute("invoiceList", invoiceList);

前端代码:

<c:if test="${not empty invoiceList }">
<c:set value="0" var="index" scope="page" />
<s:iterator value="#request.invoiceList"  var="invoice">    
  <li>  
    <table width="100%">                
      <tr>
         <td width="90">${invoice.invoiceNo}</td>  
      </tr>
    </table>
  </li>                         
<c:set value="${index+1 }" var="index" scope="page" /> 
</s:iterator>
</c:if> 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值