Error creating bean with name 'diaryDAO' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' is required的错误原因:
在applicationContext.xml文件中的有关DAO的bean里面没有注入sessionFactory。