I am developing spring-hibernate-jsf application but i dont understand the difference between a managedbean and a spring controller. I think managedbeans work like controllers. Is there any advantage of using controller or managedbean?
Managed Beans provides services and are used as model for UI components. Controllers are request/response components like Servlets.
JSF is a component based web framework & Spring is a DI framework. JSF & Spring manages their own beans, so to reference ManagedBeans and inject in them you need to mark JSF ManagedBeans as Spring Controllers using @Controller annotation.
If you are thinking of replacing one with other, then no you have to use both of them if you want to use both Spring & JSF together.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With