You might want to try MyBatis Generator (MBG). It can automatically generate the following from the database tables: Java POJO classes, Mapper interfaces, and Mapper XML files.