Spring DAO is not injected in JSF managed bean

后端 未结 3 926
长情又很酷
长情又很酷 2020-12-24 11:29

I am using JSF2+Spring3.1+Hibernate4 in my demo application and i will want to use annotation to create session factory but my DAO class is not initialize in Jsf Managed Bea

3条回答
  •  孤独总比滥情好
    2020-12-24 11:51

    Remove bean declaration from your applicationContext.xml. As you have annotated UserDao with @Repository the spring container will create a singleton bean out of it. This should solve your problem.

    Remove this from applicationContext.xml :

提交回复
热议问题