简体   繁体   English

有谁知道如何成功整合Seam和Spring MVC?

[英]Does anyone know how to successfully integrate Seam and Spring MVC?

As the title says. 如标题所示。 Is there a way to integrate the two? 有没有办法整合两者?

I'm sure it's possible if you're skilled with both, but the question on my lips and all the Seam developers is "why?" 我敢肯定,如果您同时具备这两种技能,那肯定是可能的,但是我和所有Seam开发人员的疑问是“为什么?”

Seam combines JSF and Hibernate. Seam结合了JSF和Hibernate。 Where does Spring fit? 春天适合哪里? What is it providing for you that the Seam stack doesn't? Seam堆栈没有为您提供什么?

I haven't done it. 我还没做 I use Spring and Hibernate but not Seam. 我使用Spring和Hibernate,但不使用Seam。 As far as I know, it's a JBOSS-only solution. 据我所知,这是仅JBOSS的解决方案。

You can certainly use Spring, Hibernate, and JSF together. 您当然可以一起使用Spring,Hibernate和JSF。 You just can't use any Seam-specific code. 您只是不能使用任何特定于Seam的代码。 If you choose to go that way, you can deploy your code on any Java EE app server, including JBOSS. 如果选择采用这种方式,则可以将代码部署在任何Java EE应用服务器上,包括JBOSS。

The point of Seam is that it is a closed(-ish) technology stack combining JSF and Hibernate. Seam的要点是它是一个结合了JSF和Hibernate的封闭式技术堆栈。 I say "closed" because it started that way but isn't strictly true anymore. 我说“关闭”是因为它以这种方式开始,但严格来说不再是真的。 For example, you can run it on appserver that aren't JBoss and use different JPA providers. 例如,您可以在非JBoss的appserver上运行它,并使用其他JPA提供程序。 That being said, it is primarily used on JBoss+JSF+Hibernate. 话虽如此,它主要用于JBoss + JSF + Hibernate。

As for how to integrate it with Spring MVC, well that doesn't make a lot of sense. 至于如何将其与Spring MVC集成,那没有什么意义。 Why not then just use Spring MVC + Hibernate + JSF if you really want (I"m not a big fan of JSF but to each his own). 如果您真正想要的话,为什么不使用Spring MVC + Hibernate + JSF(我不是JSF的忠实拥护者,而是每个人自己)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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