• iBatis


    iBATIS 来源于“internet”和“abatis”(有刺铁丝网),最初侧重于密码软件的开发,现在是一个基于java的持久层框架。

    iBATIS提供的持久层框架包括SQL Maps和Data Access Objects (DAO).目前提供了三种语言实现的版本,包括:java,.NET以及Ruby

    程序员往往只需要定义好了POJO到数据库的映射关系,即可通过Hibernate或者OJB提供的方法完成持久层操作。

    the iBatis philosophy

    Since Structured Query Language (SQL) been around, corporate IT forcused in relational datbase management system(RDBMS).

    SimpleDataSource: Error while loading properties. Cause: java.lang.RuntimeException: SimpleDataSource: Some properties were not set.

    这种错误看看config file 有没有漏写什么属性 特别注意拼写错误啊 driver /drive什么的

    需要补充的是;

    dom4j:

    1. 当创建document后需要打印

    2.传送参数的时候 inline parameter没有成功

    原型参数
    <select id="select1" parameterClass="java.lang.String"resultClass="AppLog">
        select
          ID as id,
          TYPE as type,
          DESCR as descr
        from APP_LOG
        where ID = #id#
    </select>
     
      
    sqlMapper.queryForObject("select0", id);

     最后还是用的map

    HashMap mp = new HashMap();
    //这里就直接赋值0和6了,正常开发时,应该靠传参来获得值,不然就如1所言,没意义。
    int StartRow=0
    int PageSize=6
    mp.put("StartRow", StartRow);
    mp.put("PageSize", PageSize);
    ArrayList list=sqlMapClinet.queryForList("selectAll",mp);

    <select id="selectAll"   parameterClass="int" resultClass="pojo.Staff">  select   * from staff LIMIT #StartRow#,#PageSize#; </select>

  • 相关阅读:
    汉明距离
    Go_go build 和 go install
    rabbitmq的简单介绍二
    rabbitmq的简单介绍一
    redis的订阅和发布
    python操作redis
    vmware虚拟机开机报附件中的错误的解决办法
    使用twised实现一个EchoServer
    python事件驱动的小例子
    mysql数据库的最基本的命令
  • 原文地址:https://www.cnblogs.com/lauraxia/p/2907727.html
Copyright © 2020-2023  润新知