严重: Context initialization failed
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'userDao' defined in file [D:\Tomcat8\webapps\log\WEB-INF\classes\com\fjnu\log\config\applicationContext-beans.xml]:
Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [D:\Tomcat8\webapps\log\WEB-INF\classes\com\fjnu\log\config\applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: could not instantiate id generator [entity-name=com.fjnu.log.domain.Log]
beans配置
配置文件问题,看看配置bean id = sessionFactory的地方是否正确。 could not instantiate id generator [entity-name=com.fjnu.log.domain.Log]看一下这个配置文件中id主键生成器是否正确,数据库配置以及mapper文件配置