MyBatis is a persistence framework that maps SQL to Java objects. The MyBatis learning curve is flatter than JPA's and leverages on SQL, which makes it a good match if you have good knowledge about SQL or have many complex SQL queries you want to reuse.
As usual, you first need to add the dependency. Here is how to do it with Maven:
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.4.5</version>
</dependency>
You can find the full implementation of the example developed in this section in the Data-centric-Applications-with-Vaadin-8/chapter-06/mybatis-example Maven project.