开发者

Manage beans via Spring or via JSF

In my JSF Webapp I am 开发者_如何学Cusing Spring vor DI etc.

At the moment I have my beans managed by Spring. (SpringBeanFacesELResolver defined in faces-config.xml)

But I'm not sure, if this is the right way... For example: A bean defined in Spring cannot use the new JSF 2 view scope, right?

My question is not, if I should use Spring or not... Just HOW to manage my beans?!


You should in any case stick with one DI in your project. For me, Spring is clearly much more powerful that JSF managed beans. So I would opt to Spring in this situation.

You can hanlde view scope in Spring using custom scopes, it is quite straigtforward actually. Here's a blog post on this question.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜