Error creating bean with name 'dataSource' defined in class path resource [applicationContext.xml]:

Error creating bean with name 'dataSource' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is javax.naming.NoInitialContextException:

这个错误是你在加载spring的配置文件applicationContext.xml 的时候,缺少相应的jar包导致的,只需要加入相应的jar包即可,

如下:

Error creating bean with name 'dataSource' defined in class path resource [applicationContext.xml]:_第1张图片

添加到lib中,在build path即可

你可能感兴趣的:(mybatis,error)