Java persistence using MyBatis

所在平台: Udemy

课程主页: https://www.udemy.com/course/java-persistence-using-mybatis/

课程评论:没有评论

第一个写评论        关注课程

课程简介

课程名称:使用MyBatis进行Java持久化 概述:MyBatis是一个Java持久化框架,它通过XML描述符或注解将对象与存储过程或SQL语句结合起来。MyBatis是免费软件,依据Apache许可证2.0发布。它是iBATIS 3.0的一个分支,由iBATIS的原始创作者团队维护。与ORM框架不同,MyBatis并不将Java对象映射到数据库表,而是将Java方法映射到SQL语句。MyBatis让您能够使用所有数据库功能,如存储过程、视图、各种复杂查询和供应商特有的功能。因此,对于遗留或非规范化数据库,或者需要对SQL执行完全控制的场景,MyBatis常常是一个不错的选择。与JDBC相比,它简化了编码,SQL语句只需一行即可执行。MyBatis提供了一个映射引擎,以声明式方式将SQL结果映射到对象树。SQL语句可以通过使用内置语言(XML样式语法)或通过整合插件Apache Velocity动态构建。MyBatis还与Spring框架和Google Guice集成,使得业务代码可以无依赖地构建。此外,MyBatis支持声明式数据缓存,可以标记某个语句为可缓存,以便从数据库检索的数据存储在缓存中,未来对此语句的执行将从缓存中获取数据,而不是再次访问数据库。MyBatis提供基于Java HashMap的默认缓存实现,并且提供与OSCache、Ehcache、Hazelcast和Memcached的集成连接器,以及接入其他缓存实现的API。 此课程适合希望深入学习MyBatis框架,并掌握其在Java应用程序中持久化数据的能力的开发者。

课程评论(0条)

课程详情

MyBatis is a Java persistence framework that couples objects with stored procedures or SQL statements using an XML descriptor or annotations. MyBatis is free software that is distributed under the Apache License 2.0. MyBatis is a fork of iBATIS 3.0 and is maintained by a team that includes the original creators of iBATIS. Unlike ORM frameworks, MyBatis does not map Java objects to database tables but Java methods to SQL statements.MyBatis lets you use all your database functionality like stored procedures, views, queries of any complexity and vendor proprietary features. It is often a good choice for legacy or de-normalized databases or to obtain full control of SQL execution. It simplifies coding compared to JDBC. SQL statements are executed with a single line. MyBatis provides a mapping engine that maps SQL results to object trees in a declarative way.SQL statements can be built dynamically by using a built-in language with XML-like syntax or with Apache Velocity using the Velocity integration plugin. MyBatis integrates with Spring Framework and Google Guice. This feature allows one to build business code free of dependencies. MyBatis supports declarative data caching. A statement can be marked as cacheable so any data retrieved from the database will be stored in a cache and future executions of that statement will retrieve the cached data instead hitting the database. MyBatis provides a default cache implementation based on a Java HashMap and default connectors for integrating with: OSCache, Ehcache, Hazelcast and Memcached. It provides an API to plug other cache implementations.

课程标签

0人关注该课程

主题相关的课程