开发者

Using spring with objects injected via JSF

开发者 https://www.devze.com 2023-01-24 05:02 出处:网络
I have a large existing app开发者_如何学Pythonlication with a bunch of managed-beans that are injected via JSF\'s ioc.

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

精彩评论

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

关注公众号