First knowledge of ibatis

Source: Internet
Author: User

Let's first introduce the tools/technologies I use.

  • Myeclipse6.5 + mysql5.0 + spring2.5 + ibatis2.0

The new data table contains four tables: t_user, t_user2, t_address, and topic.

  • The basic structure of the t_user and t_user2 tables is basically the same. The difference is that the names of the table's column names are different.
  • The relationship between the t_user table and the t_address table is directly composed of the primary and Foreign keys.
  • The topic is mainly used for paging examples, but I have not finished the time. (This paging example can be found online)

Corresponding entity class

  • The user. Java and user3.java correspond to the t_user table,
  • User2.java corresponds to the t_user2 table.
  • Address. Java corresponds to the t_address table.

Corresponding Dao and interface, test class

  • Basically, it is a one-to-one relationship, and there are related tags that can be distinguished when spring integration is used.
  • My basic idea is to first build t_user, user. Java, userdao. Java ...... T_user2 ,...... The last step is paging. Integrate ibatis with spring2.5.

Main Content

  • Map a MySQL database using ibatis
  • Call Stored Procedure
  • Two different ing methods
  • Dynamic statement Query
  • Cascade Query
  • MySQL Paging
  • Integrate ibatis with spring

Others:

  • You can participate in related comments and reference files in the project. What I want to see is ibatis (in the reference folder ).

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.