minidao_1.6.4 release, lightweight Java Persistence Framework, Hibernate project Assist tool

Source: Internet
Author: User

Minidao profile and Features

The Minidao is an ultra-lightweight Java Persistence layer framework with mybatis-like SQL capabilities: Supports SQL separation, supports labeling, and supports annotations. Minidao was originally created to address the Hibernate project's ability to support complex SQL, with MyBatis-like flexibility while supporting transactional synchronization.

Has the following characteristics:

    • O/R mapping without setting XML, 0 configuration is easy to maintain
    • No need to know the knowledge of JDBC
    • Separation of SQL statements from Java code
    • Only interface definition, no interface implementation required
    • SQL support scripting language (powerful scripting language, Freemarker syntax)
    • Supports seamless integration with hibernate lightweight
    • Supports automatic and manual transaction processing
    • Better performance than MyBatis
    • Easier to use than MyBatis
    • SQL Support Annotation Method
    • SQL supports standalone file mode, SQL file naming rules: Class name _ Method name; SQL files are easier to locate, the bigger the project the more obvious the advantage
    • The SQL tag uses the basic syntax of Freemarker
The original intention of Minidao?

The hibernate-based EE project has a pain sickness, a lack of SQL capability for complex operations, poor SQL optimization, and no separation. This time people think of integration MyBatis, but a project both hibernate and use MyBatis, it seems very heavy business is not control. It is common practice to use SPRINGJDBC to write native SQL, but there are also problems where SQL cannot be separated and has no logical tagging capability. So in order to solve this pain, JEECG for the Springjdbc+freemarker did a package, out of such a lightweight persistence layer, you can let Hiberate have mybatis the same SQL flexibility, while supporting transactional unified, SQL tag capabilities.

Version upgrade log
    • 1. Simplify the Pom.xml configuration and delete unwanted dependencies
    • 2. Log rewriting, unified implementation of the interface
    • 3. Upgrade Freemarker version
    • 4. Provide transaction demo, annotation method
    • 5. Normalize code, log printing normalization, improve efficiency and versatility
SOURCE download
    • Source: Https://github.com/zhangdaiscott/MiniDao
    • Https://gitee.com/jeecg/minidao
    • Forum: www.jeecg.org
    • Document: Http://minidao.mydoc.io
    • QQ Exchange Group: ①325978980
SOURCE Interpretation:
@MiniDao Public  interface EmployeeDAO {public     list<map> getallemployees (@Param ("employee") employee Employee);     Employee GetEmployee (@Param ("Empno") String empno);     Map Getmap (@Param ("Empno") string empno, @Param ("name") string name);     @Sql ("SELECT count (*) from employee")   Integer GetCount ();     int update (@Param ("employee") employee employee);     void Insert (@Param ("employee") employee employee);  

SQL definition:

SELECT * FROM employee where 1=1   < #if employee.age?exists> and age  =: employee.age  </#if >
   < #if employee.name?exists> and  name =: Employee.Name  </#if >  < #if employee.empno? Exists> and  empno =: employee.empno  </#if >

  

minidao_1.6.4 release, lightweight Java Persistence Framework, Hibernate project Assist tool

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.