O'Reilly logo

Java Persistence with MyBatis 3 by K. Siva Prasad Reddy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

In this chapter, we discussed about MyBatis and the advantages of using MyBatis instead of plain JDBC for database access. We learned how to create a project, install MyBatis jar dependencies, create a MyBatis configuration file, and configure SQL mapped statements in Mapper XML files. We created a Service class to insert and get data from the database using MyBatis. We created a JUnit test case for testing Service.

In the next chapter, we will discuss bootstrapping MyBatis using XML and Java-API-based approaches in detail.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required