Spring notes(六) - DAO and ORMapping support
Spring provides all kinds of DAO layers:
JdbcDaoSupport: you can get JdbcTemplate.
HibernateDaoSupport:you can get hibernateTemplate and SessionFactory
JdoDaoSupport: you can get jdoTemplate and PersistenceManagerFactory
JpaDaoSupport: you can get jpaTemplate and EntityManagerFactory
SqlMapDaoSupport: you can get sqlMapDaoTemplate and SqlMapClient
So, you can extend these XxxDaoSupport to expose CRUD APIs.
In spring applicationContext.xml, you should inject Datasource, SessionFactory, PersistenceManagerFactory, EntityManagerFactory, SqlMapClient bean to [...]
By javafuns on March 18, 2008 at 23:35 ·
Views: 1,264 · Permalink
· 2 Comments
Categorized in: Design Patterns, Java · Tagged with: DAO, Java, Spring
Categorized in: Design Patterns, Java · Tagged with: DAO, Java, Spring

(
(4.00 out of 5)