把你的spring配置文件贴出来看看

解决方案 »

  1.   

    检查一下的spring配置文件中是不是配置了dataSource这个名称的bean。
      

  2.   

    肯定没有缺,因为我直接在web服务器启动的情况下,运行java文件中的main函数来得到ApplicationContext applicationContext=WebApplicationContextUtils.getRequiredWebApplicationContext(event.getServletContext());
    applicationContext.getBean("dataSource");是正常的,原因可能就是说:在web环境下,EventInterceptorListener在运行以上代码时,xml的配置文件系统还没有初始化好。各位怎么认为?
      

  3.   

    应该是其他的DAO类或者 Service类里面出现问题!