开发者

Using spring with objects injected via JSF

I have a large existing app开发者_如何学Pythonlication with a bunch of managed-beans that are injected via JSF's ioc.

I want to start autowiring things into these beans. Currently i cannot do so because these beans are not created via spring.

What is the easiest way to solve this problem?


You can make spring get control over JSF injection by using a special EL Resolver (in faces-config.xml):

<el-resolver>
   org.springframework.web.jsf.el.SpringBeanFacesELResolver
</el-resolver>

If you are using JSF 2.0, it's advisable that you try CDI (Contexts and Dependency Injection)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜