开发者

Using Hibernate with Struts

How can I configure 开发者_运维技巧Hibernate in Struts?


There's a good JavaWorld article on this topic called Struts Recipes: Hibernate and Struts. I suggest you start there.


If you're really smart neither one will know anything about the other.

Hibernate is purely about persistence. It ought to be hidden from Struts behind an interface.

Struts is purely about view. Your Action classes ought to have references to those persistence interfaces and deal with those. It shouldn't know anything about how the interfaces are implemented.

This approach will decouple the two, making your testing job easier. You can write the persistence tier, test it thoroughly, and put it aside.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜