简体   繁体   中英

What ORM should I use for Spring MVC Project with Derby db?

i'm developing a web project which use Spring MVC and an apache derby embedded. This database contains a table for Users, Roles and Users-Roles. I have to do a typical CRUD. Due to it is my first time using derby. I tried to access my db using java.sql.Connection, java.sql.ResultSet, etc. It works good, is it necessary to connect to the db manually and write sql code in java classes?

Somebody recommended me using Spring jdbctemplate. I'm looking for something like Ibatis, which maps the objects and db entities transparently.Is it possible to use Spring JdbcTemplate with iBatis??

Thank you

I'd recommend Hibernate simply because it's supported by Spring and has really nice transaction management with Spring. There's also tonnes of documentation about Spring with Hibernate.

Hibernate also has strong support with Derby and all you need to do is put the correct dialect in.

Spring is compatible with both ORM, Hibernate and iBatis. In order to know which works best for you, there is a good write-up comparing both these frameworks. Here is the link . Secondly to integrate iBatis with Spring, here is a starter example .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM