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包即可,

如下:

添加到lib中,在build path即可

猜你喜欢

转载自blog.csdn.net/itxiaobaibai/article/details/80657939