Giter VIP home page Giter VIP logo

learn_mybatis's Introduction

《MyBatis应用分析与最佳实践》课后作业

课01作业

1.resultType(属性)和resultMap(标签引用)的区别?

resultType和resultMap都是结果集映射成POJO的,2个不能同时使用。
resultType:返回的期望类型的类完全限定名或别名。
resultMap:外部resultMap的命名引用,可以通过自定义,映射更为复杂的情形。

2.collection和association的区别?

association和collection都是resultMap元素的子元素。
association处理的是一对一的问题。
collection处理的是一对多的问题。

3.Statement和PreparedStatement的区别?

PreparedStatement是预编译,数据库对预编译的SQL会有缓存支持,多次执行,性能会比Statement好。
PreparedStatement的安全性会比Statement好,可以防止SQL注入问题。

课02作业

1、跟踪update()流程,绘制每一步的时序图(4个)

2、总结:MyBatis里面用到了哪些设计模式?

learn_mybatis's People

Contributors

nanyoyo avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.