开发者

How to integrate Spring ,JSF and hibernate

开发者 https://www.devze.com 2023-01-06 10:58 出处:网络
I\'m trying to integrate spring with jsf portlet that uses hibernate.I just want to use spring DAO to get the best of spring transacti开发者_开发技巧on management.

I'm trying to integrate spring with jsf portlet that uses hibernate.I just want to use spring DAO to get the best of spring transacti开发者_开发技巧on management.

How could I do this in a simple way?

It's worth to mention that I'm using ant.

Thanks


Spring and hibernate are integrated automatically - spring provides enough on that part. Perhaps you can use the EntityManager (annotated with @PersistenceContext) instead of HibernateTemplate.

The JSF integration is done via registering a special ELResolver that resolves managed beans from the spring context.

An example how to do all this can be found here - checkout the project and see how it is configured.

0

精彩评论

暂无评论...
验证码 换一张
取 消