How to @autowire into jsf managed beans How to @autowire into jsf managed beans spring spring

How to @autowire into jsf managed beans


Just annotate your managed beans with @Controller (or @Component), and @Scope("request") (or session) and add <context:component-scan> (if you haven't), and managed beans will automatically be detected as spring beans. And since you are already using the ELResolver, that should be it - you should be able to use @Autowired (or better - @Inject, if using spring 3.0).


You can use @ManagedProperty(#{'someBean'}) for autowire other beans in jsf bean