Here I describe the project configuration to use MyBatis as ORM and benefit of the transactions management provided by Spring. For that, we have to add the MyBatis-Spring library to the basic MyBatis. First, the Maven POM is like: <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>3.2.3</version> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> <version>1.2.1</version> </dependency> And now, the Spring configuration file… Continue reading Spring MyBatis configuration
Tag: MyBatis
Persist list with MyBatis
As MyBatis is a basic ORM, when we need to persista list of objects, we have to implement it manually, but without any copy/paste between classes. For this purpose, I designed a generic merger which is responsible of that task. It has to go through a list of objects and determine: what is new and… Continue reading Persist list with MyBatis
MyBatis+Spring+Generics
As I was working on the data access layer of my project, I noted that I have a lot of stuff to do to be able to access the Mapper from my web layer just for some simple CRUD actions. Lot of stuff and even if I can detect some similarities, it’s not exactly the… Continue reading MyBatis+Spring+Generics
Improve server startup using Informix and MyBatis
Working on a project with an Informix database and using MyBatis as the persistence layer, I noted that the start-up of the server takes a long time (about 2 minutes). It is not really a problem if the performance of the application are good, as you don’t start your server all the day, but when… Continue reading Improve server startup using Informix and MyBatis