zoukankan      html  css  js  c++  java
  • MyBatis框架

    1:MyBatis核心对象(生命周期与作用域)

    SqlSessionFactoryBuilder

    SqlSessionFactory

    SqlSession

    通过SqlSession实例直接执行已映射的SQL语句

    基于Mapper接口方式操作数据

    2:MyBatis核心配置文件

    (mybatis-config.xml)

    properties元素

    settings元素

    typeAliases元素

    environments元素

    dataSource 数据源

    transactionManager 事务管理器

    mappers元素

    3:MyBatis-SQL映射文件(mapper.xml)

                namespace

                insert、update、delete、select元素

                         id :唯一标识

                         parameterType:直接表示参数类型 使用@Param实现多参数入参

                         resultType :直接表示返回类型

                         resultMap :表示对外部resultMap的引用

                resultMap元素

                   属性 id,type

                子节点

                     id, result, association ,collection

                动态SQL

                     if ,where ,set ,trim ,foreach ,choose(when、otherwise)

  • 相关阅读:
    leetcode — simplify-path
    leetcode — climbing-stairs
    leetcode — sqrtx
    leetcode — text-justification
    leetcode — add-binary
    leetcode — plus-one
    leetcode — valid-number
    leetcode — minimum-path-sum
    leetcode — unique-paths-ii
    四维偏序 CDQ套CDQ
  • 原文地址:https://www.cnblogs.com/zjx-959/p/13853048.html
Copyright © 2011-2022 走看看